G
Guest
hello
i have one interface and a class inherit the interface like below:
public interface IFoo
{
string FooName
{
get;
set;
}
}
[Serializable()]
public class Foo:IFoo
{
public string FooName
{
get{ ... }
set{ ... }
}
}
And i have one class using Foo like below:
public class FooContainer
{
public IFoo[] Foos { ... }
}
When i create a web service to delive class FooContainer to client, i get an
error means: Can not serialize interface IFoo.
I want to inherit ISerialzable in IFoo like below:
public interface IFoo:ISerializable.
And implement ISerializable in class Foo, but i get the same error.
What should i do to correct it?
thx.
i have one interface and a class inherit the interface like below:
public interface IFoo
{
string FooName
{
get;
set;
}
}
[Serializable()]
public class Foo:IFoo
{
public string FooName
{
get{ ... }
set{ ... }
}
}
And i have one class using Foo like below:
public class FooContainer
{
public IFoo[] Foos { ... }
}
When i create a web service to delive class FooContainer to client, i get an
error means: Can not serialize interface IFoo.
I want to inherit ISerialzable in IFoo like below:
public interface IFoo:ISerializable.
And implement ISerializable in class Foo, but i get the same error.
What should i do to correct it?
thx.