Click here to Skip to main content
16,005,734 members
Home / Discussions / C#
   

C#

 
QuestionChange Colour of Rows in DataGrid Pin
zaboboa14-Sep-05 6:33
zaboboa14-Sep-05 6:33 
Questionhow do i deploy an application that uses crystal reports? Pin
AfzalHassen14-Sep-05 4:30
AfzalHassen14-Sep-05 4:30 
AnswerRe: how do i deploy an application that uses crystal reports? Pin
Mark0614-Sep-05 11:40
Mark0614-Sep-05 11:40 
QuestionUserControl not marked as serializable Pin
edvler14-Sep-05 3:11
edvler14-Sep-05 3:11 
QuestionHow to collapse an array? Pin
Yannielsen14-Sep-05 3:09
Yannielsen14-Sep-05 3:09 
AnswerRe: How to collapse an array? Pin
Dan Neely14-Sep-05 4:08
Dan Neely14-Sep-05 4:08 
AnswerRe: How to collapse an array? Pin
esjq14-Sep-05 4:30
esjq14-Sep-05 4:30 
QuestionXML serialization Pin
Yoyosch14-Sep-05 2:46
Yoyosch14-Sep-05 2:46 
I have a simple class:

public class Test
	{
		public Test()
		{
		}

		public string name;
		public int age;
	}


and part of the code used in de/serialization:
Test c;
Test a = new Test("martinez", 21);
Test b = new Test("kate", 20);
TextWriter tw = new StreamWriter("c:/text.txt");

System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(Test));

ser.Serialize(tw,a);			
ser.Serialize(tw,b);
tw.Close();

TextReader tr = new StreamReader("c:/text.txt");
c = (Test)ser.Deserialize(tr);
tr.Close();

And here pops an error
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll

Additional information: There is an error in XML document (12, 3).

, why I can`t deserialize an object from that file?

Further question - may I keep different sort of objects in one file? If so, how to check if read object is the one I was looking for?

thank you for any help
Questionhow to handle locations of innet control of a user control Pin
arusmemon14-Sep-05 2:37
arusmemon14-Sep-05 2:37 
Questioncreating control array in runtime Pin
liqnit14-Sep-05 2:33
liqnit14-Sep-05 2:33 
AnswerRe: creating control array in runtime Pin
Dave Kreskowiak14-Sep-05 4:51
mveDave Kreskowiak14-Sep-05 4:51 
GeneralRe: creating control array in runtime Pin
liqnit17-Sep-05 19:44
liqnit17-Sep-05 19:44 
Questionhow to find type of Dll Pin
Anonymous14-Sep-05 2:02
Anonymous14-Sep-05 2:02 
AnswerRe: how to find type of Dll Pin
miah alom14-Sep-05 4:19
miah alom14-Sep-05 4:19 
QuestionCan you change the protected statusof a file? Pin
Anonymous14-Sep-05 1:46
Anonymous14-Sep-05 1:46 
AnswerRe: Can you change the protected statusof a file? Pin
Dave Kreskowiak14-Sep-05 4:46
mveDave Kreskowiak14-Sep-05 4:46 
QuestionExcel macro from c# Pin
Lailinha14-Sep-05 1:43
Lailinha14-Sep-05 1:43 
AnswerRe: Excel macro from c# Pin
tekken2214-Sep-05 8:15
tekken2214-Sep-05 8:15 
GeneralRe: Excel macro from c# Pin
Lailinha14-Sep-05 8:29
Lailinha14-Sep-05 8:29 
QuestionHow do set another folder than \bin for my assemblies when "Local Copy"... Pin
MaWeRic14-Sep-05 1:28
MaWeRic14-Sep-05 1:28 
QuestionC# from Excel Pin
Lailinha13-Sep-05 23:56
Lailinha13-Sep-05 23:56 
AnswerRe: C# from Excel Pin
Dave Kreskowiak14-Sep-05 1:35
mveDave Kreskowiak14-Sep-05 1:35 
AnswerRe: C# from Excel Pin
Daniel Turini14-Sep-05 3:02
Daniel Turini14-Sep-05 3:02 
GeneralRe: C# from Excel Pin
Lailinha14-Sep-05 3:05
Lailinha14-Sep-05 3:05 
GeneralRe: C# from Excel Pin
Daniel Turini14-Sep-05 3:31
Daniel Turini14-Sep-05 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.