-1

I am working with sending objects over network. I have it working with custom objects just fine but my question is can I serialize system objects? For example I want to serialize the System.Net.NetworkInformation.NetworkInterface object on one computer and send it to another so I can load all of its properties easily. Is this possible? This doesn't seem to work:

  <Serializable()> NIC As System.Net.NetworkInformation.NetworkInterface 

Thanks in advance

Willy
  • 137
  • 13

1 Answers1

0

An object type has to be designed to be serializable, and marked so in it's original code. You will need to build your own object to keep the properties that you care about, mark it serializable, and use that.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • This is what I was afraid of. There are a lot of properties and I was trying to be lazy and just send the whole object then have to program all of the ones I need :) which could be a lot of them. I don't want to have to re-invent what is already there! – Willy Jun 25 '14 at 20:50