Click here to Skip to main content
15,886,802 members
Home / Discussions / C#
   

C#

 
GeneralTime checker Pin
deanoA6-Aug-03 15:00
deanoA6-Aug-03 15:00 
GeneralRe: Time checker Pin
Vasudevan Deepak Kumar6-Aug-03 19:27
Vasudevan Deepak Kumar6-Aug-03 19:27 
QuestionHow to get the text from the textbox in the other application Pin
lithium74566-Aug-03 14:51
lithium74566-Aug-03 14:51 
AnswerRe: How to get the text from the textbox in the other application Pin
deanoA6-Aug-03 15:02
deanoA6-Aug-03 15:02 
AnswerRe: How to get the text from the textbox in the other application Pin
Nish Nishant6-Aug-03 15:47
sitebuilderNish Nishant6-Aug-03 15:47 
GeneralClear DataBindings Dataview & Datagrid Pin
Milancie6-Aug-03 11:13
Milancie6-Aug-03 11:13 
GeneralRe: Clear DataBindings Dataview & Datagrid Pin
Ista6-Aug-03 17:56
Ista6-Aug-03 17:56 
GeneralXML-serializer with ABSTRACT class Pin
MeisterBiber6-Aug-03 10:04
MeisterBiber6-Aug-03 10:04 
Hi !

I have a problem with serializing a class, which has a variable with an abstract-class-type.
If I'm using the specific class Test2, everything works fine,
but when I use the abstract class Test, I get the following error-message:

An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll

Additional information: There was an error generating the XML document.

Does anybody know whats the matter here?

using System;
using System.Xml;
using System.Xml.Serialization;
using System.IO;

namespace xmlTest
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
myObject o = new myObject();

XmlSerializer mySerializer = new XmlSerializer(typeof(myObject));
StreamWriter myWriter = new StreamWriter("test.xml");
mySerializer.Serialize(myWriter, o);
}
}
public class myObject
{
//public Test2 t = new Test2();
public Test t = new Test2();
}
public abstract class Test
{
public string s = "Test";
}

public class Test2:Test
{
new public string s="Test2";
}

}

Thank you !!!!

GeneralRe: XML-serializer with ABSTRACT class Pin
Furty6-Aug-03 17:25
Furty6-Aug-03 17:25 
GeneralRe: XML-serializer with ABSTRACT class Pin
James T. Johnson6-Aug-03 21:41
James T. Johnson6-Aug-03 21:41 
GeneralRemoting between applications on the same machine Pin
Bog6-Aug-03 8:34
Bog6-Aug-03 8:34 
GeneralRe: Remoting between applications on the same machine Pin
Anonymous6-Aug-03 9:03
Anonymous6-Aug-03 9:03 
GeneralRe: Remoting between applications on the same machine Pin
Nish Nishant6-Aug-03 15:53
sitebuilderNish Nishant6-Aug-03 15:53 
QuestionHow To (Best Approach) Pin
NamoGuy6-Aug-03 7:47
NamoGuy6-Aug-03 7:47 
AnswerRe: How To (Best Approach) Pin
Ista6-Aug-03 17:58
Ista6-Aug-03 17:58 
GeneralReturn int and testing for value problem Pin
mikemilano6-Aug-03 7:29
mikemilano6-Aug-03 7:29 
GeneralRe: Return int and testing for value problem Pin
Arun Bhalla6-Aug-03 8:04
Arun Bhalla6-Aug-03 8:04 
GeneralPop-up windows Pin
Hktam6-Aug-03 5:38
Hktam6-Aug-03 5:38 
GeneralRe: Pop-up windows Pin
Frank Olorin Rizzi6-Aug-03 6:49
Frank Olorin Rizzi6-Aug-03 6:49 
GeneralRe: Pop-up windows Pin
Hktam6-Aug-03 15:16
Hktam6-Aug-03 15:16 
GeneralRe: Pop-up windows Pin
Frank Olorin Rizzi7-Aug-03 1:19
Frank Olorin Rizzi7-Aug-03 1:19 
GeneralRe: Pop-up windows Pin
Hktam7-Aug-03 1:45
Hktam7-Aug-03 1:45 
GeneralEventLog Trace Listener Pin
Anonymous6-Aug-03 5:34
Anonymous6-Aug-03 5:34 
QuestionA easy control question? Pin
Dave Kerr6-Aug-03 3:48
Dave Kerr6-Aug-03 3:48 
AnswerRe: A easy control question? Pin
Nick Parker6-Aug-03 9:17
protectorNick Parker6-Aug-03 9:17 

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.