T
Tamir Khason
I have collection based class wich is non serializable (for some reason)
[NonSerClass]
I want to create another class with similar to [NonSerClass], but
serializable [SerClass]
so doing:
public class NonSerClass:CollectionBase
{Whatever}
[Serializable]
public class SerClass : NonSerClass
This working fine, except the little problem. while casting from NonSerClass
to SerClass I recieve "Invalid Cast" exception, as well as attempts like
NonSerClass no_ser_foo = new NonSerClass();
SerClass ser_foo =no_ser_foo as SerClass;
returns null
Please advice. Why is it
TNX
[NonSerClass]
I want to create another class with similar to [NonSerClass], but
serializable [SerClass]
so doing:
public class NonSerClass:CollectionBase
{Whatever}
[Serializable]
public class SerClass : NonSerClass
This working fine, except the little problem. while casting from NonSerClass
to SerClass I recieve "Invalid Cast" exception, as well as attempts like
NonSerClass no_ser_foo = new NonSerClass();
SerClass ser_foo =no_ser_foo as SerClass;
returns null
Please advice. Why is it
TNX