1. Home
  2. Computing & Technology
  3. Visual Basic
photo of Dan Mabbutt
Dan's Visual Basic Blog

By Dan Mabbutt, About.com Guide to Visual Basic since 2002

It's time to confess!!

Thursday December 30, 2004

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 attribute tag must be part of the code. It should look like this:

<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

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.