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

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top