Friday, May 21, 2010

How do you code an AlphaNumeric error in Visual Basic?

I need to know how to code an AlphaNumeric error in Visual Studio.NET. My assignment was to create a guessing game. There are several versions that I had to create. The last version requires you to set up an AlphaNumeric error and an Out-of-Bounds error. How do I do this?

How do you code an AlphaNumeric error in Visual Basic?
You do this using the Variant data type. In most other languages, you return an impossible value of the same type when there is an error (e.g., -1 if a substring is not found). If you return an impossible value, make sure it is truly impossible for your use.


No comments:

Post a Comment