G
Guest
oop Q:
If I serialize an interface array, then later deserialize it, do I need the
original
assembly to deserialize it???
Eg:
// Inside of "globaly assembly"
public interface Ianimal
{
string myColor
{ get;}
}
// "Dog Assembly" Inside of dynamicaly loaded assembly.
// Knows only "global Assembly"
public class dog: Ianimal
{
string myColor
{
get{return "black";}
}
}
// my main Assembly where the "magic" happens.
//Initialy only knows the "global assembly"
pubilc class myMainClass
{
Type AnimalType;
void DynamiclyLoadAssembly(string assemblyFileName)
{ //ommitted,but this is where AnimalType is defined}
private Ianimal[] myAnimals;
void SomeFunction(int x)
{
Ianimal[x] = (Ianimal) (new AnimalType());
}
private SerializeAnimals(Ianimals[] myAnimals )
{//ommitted}
private DeserializeMyAnimals()
{
//Q: If the next time I run the app, and I dont load the "Dog Assembly",
// will this fail?????????????????????????????
}
}
Thanks in advance.
If I serialize an interface array, then later deserialize it, do I need the
original
assembly to deserialize it???
Eg:
// Inside of "globaly assembly"
public interface Ianimal
{
string myColor
{ get;}
}
// "Dog Assembly" Inside of dynamicaly loaded assembly.
// Knows only "global Assembly"
public class dog: Ianimal
{
string myColor
{
get{return "black";}
}
}
// my main Assembly where the "magic" happens.
//Initialy only knows the "global assembly"
pubilc class myMainClass
{
Type AnimalType;
void DynamiclyLoadAssembly(string assemblyFileName)
{ //ommitted,but this is where AnimalType is defined}
private Ianimal[] myAnimals;
void SomeFunction(int x)
{
Ianimal[x] = (Ianimal) (new AnimalType());
}
private SerializeAnimals(Ianimals[] myAnimals )
{//ommitted}
private DeserializeMyAnimals()
{
//Q: If the next time I run the app, and I dont load the "Dog Assembly",
// will this fail?????????????????????????????
}
}
Thanks in advance.