How to serialize a class that includes an event in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I asked this in the VB.Net group, but hit a blank...

In C#, we can place a target an attribute - so when serializing a type, we
can apply the NonSerialized attribute to an Event using the field qualifier -
without this qualifier, we get a compile time error saying that the
NonSerialzed attribte cannot be applied to an event.

[field:NonSerialized]

My question is - can I do this in VB.NET?

Nigel Armstrong
 
Thanks Imran

It was as I thought!

Thanks for the references...

Nigel Armstrong

Imran Koradia said:
Unfortunately no - you cannot do that in VB.NET. Read here:
http://groups.google.com/groups?selm=#[email protected]


hope that helps..
Imran.


Nigel Armstrong said:
Hi All

I asked this in the VB.Net group, but hit a blank...

In C#, we can place a target an attribute - so when serializing a type, we
can apply the NonSerialized attribute to an Event using the field qualifier -
without this qualifier, we get a compile time error saying that the
NonSerialzed attribte cannot be applied to an event.

[field:NonSerialized]

My question is - can I do this in VB.NET?

Nigel Armstrong
 
Back
Top