It's time to confess!!
An About Visual Basic reader wrote,
I'm getting an error in the VB.NET program in the third part of Visual Basic .NET for Beginners. The error is as follows:
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
Additional information: The type ConsoleApplication2.VBLesson in Assembly ConsoleApplication2, Version=1.0.1823.39774, Culture=neutral, PublicKeyToken=null is not marked as serializable.
-------------
Sorry about that ... Here's the scoop!
The problem is that an error has been introduced by the conversion of many of the articles at the About Visual Basic site to a new format. One of the unfortunate side effects of this is that when I have used the HTML “PRE” tag for code examples which also happen to include tags, those tags are simply lost! I have to discover each time this has happened, one at a time, and code the article using HTML entity tags for the tag markup.
This has made my life one joy after another recently! -- Not!
In the "Visual Basic .NET for Beginners" short tutorial, the
<serializable()> Public Class VBLesson
Public LessonTitle As String
Public LessonNumber As Int16
End Class
(On a slightly - but not much - brighter note, the error message from VB.NET actually does tell you exactly what's wrong. But I admit it’s useless in detailing how to fix it.)
This was a problem in several other places in the Visual Basic .NET for Beginners short tutorial. I believe I have them fixed now, however. So if you tried this tutorial and found it totally confusing, this might be the reason. And if you notice any other articles where this might be a problem, let me know.


Comments
No comments yet. Leave a Comment