BUG: StaticLocalInitFlag not serializable

  • Thread starter Thread starter SA
  • Start date Start date
S

SA

Hi all:

I think that there is a bug in the VB.NET compiler helpers: the
documentation [1] states that the StaticLocalInitFlag is serializable, but
in fact it's not.

This means that any class written in VB.NET where there is a method that
declares a static local variable cannot be serialized.

Also see [2] for a complete explanation of how I uncovered this.

Hope this helps,

(Anyone from Microsoft here?)

[1] http://msdn2.microsoft.com/library/3edatdc5(en-us,vs.80).aspx
[2] http://www.adduxis.com/blogs/blogs/sven/archive/2005/04/23/7.aspx
 
SA said:
I think that there is a bug in the VB.NET compiler helpers: the
documentation [1] states that the StaticLocalInitFlag is serializable, but
in fact it's not.

This means that any class written in VB.NET where there is a method that
declares a static local variable cannot be serialized.

BUG: "System.Runtime.Serialization.SerializationException" Exception If You
Declare a Static Local Variable in a Method of a Visual Basic .NET Class and
Try to Serialize the Object of the Class Using BinaryFormatter or
SoapFormatter
<URL:http://support.microsoft.com/?scid=kb;EN-US;818412>
 
Oh, sorry. Talking about 1.1.

--


Sven.

OHM ( Terry Burns ) said:
This is still BETA, or have i missed something ?

--
OHM ( Terry Burns )

http://TrainingOn.net





SA said:
Hi all:

I think that there is a bug in the VB.NET compiler helpers: the
documentation [1] states that the StaticLocalInitFlag is serializable, but
in fact it's not.

This means that any class written in VB.NET where there is a method that
declares a static local variable cannot be serialized.

Also see [2] for a complete explanation of how I uncovered this.

Hope this helps,

(Anyone from Microsoft here?)

[1] http://msdn2.microsoft.com/library/3edatdc5(en-us,vs.80).aspx
[2] http://www.adduxis.com/blogs/blogs/sven/archive/2005/04/23/7.aspx
 
Herfried:

Thanks. For some reason, Google hasn't picked up on that one yet... (or at
least not with the class name I searched for)

--


Sven.

Herfried K. Wagner said:
SA said:
I think that there is a bug in the VB.NET compiler helpers: the
documentation [1] states that the StaticLocalInitFlag is serializable, but
in fact it's not.

This means that any class written in VB.NET where there is a method that
declares a static local variable cannot be serialized.

BUG: "System.Runtime.Serialization.SerializationException" Exception If You
Declare a Static Local Variable in a Method of a Visual Basic .NET Class and
Try to Serialize the Object of the Class Using BinaryFormatter or
SoapFormatter
<URL:http://support.microsoft.com/?scid=kb;EN-US;818412>
 
SA said:
Thanks. For some reason, Google hasn't picked up on that one yet... (or at
least not with the class name I searched for)

Well, I found the page through Google... :-).
 

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

Back
Top