Understanding CLS Data Types in Visual Basic .NET and C#

When working with data, such as setting or retrieving values from a form, you must normally take that information and either manipulate it or store it temporarily before you persist it to a database or a file.

In C# and Visual Basic .NET, you use variables to store information. Each variable that you declare is of a certain type, which is defined by the rules of the common type system (CTS). The CTS guarantees type safety between different languages, which was unheard of before .NET. That means when you use a String data type in C#, it's the same String data type that you use in Visual Basic .NET and COBOL .NET.

When I talk about different .NET languages, I mean that a language is considered ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.