[Serializable]
public class IPAddress
When I try to serialize it, I get the following error message:
System.Net.IPAddress cannot be serialized because it does not have a default
public constructor.
Any ideas?
Are you trying to remote an instance of IPAddress ?
The following variation seems to work...
IPAddress ip = IPAddress.Parse("157.124.5.25");
IFormatter objFormatterToStream = new SoapFormatter();
Stream toStream = new FileStream("ipdump.xml", FileMode.Create,
FileAccess.Write, FileShare.None);
objFormatterToStream.Serialize(toStream, ip);
toStream.Close();
"George Tsiokos" <geo...@tsioREMOVETHISTEXTkos.com> wrote in message
news:Swyd8.239036$jO5.30...@typhoon.tampabay.rr.com...
This doesn't work, when for example, you try to return this structure from a
method:
private Computer[] computerList;
[WebMethod]
public Computer[] List()
{
return computerList;
}
The error is: System.Net.IPAddress cannot be serialized because it does not
have a default public constructor.
"Govind_Kanshi" <Govind...@email.msn.com> wrote in message
news:uBUAJL2vBHA.2324@tkmsftngp03...