VSM: It’s All About Character in C# and Visual Basic

0
1494
Visual Studio Magazine

I’m continuing my series of articles for Visual Studio Magazine, and this time around the discussion deals with the character and string data types as used in C# and Visual Basic. Both languages defer to the core .NET data types when dealing with text content, so they behave identically in every way. Or do they?

Visual Basic, designed as it was for the entry-level software developer, includes some nice usability features that wrap up a lot of boilerplate code and safe data practices into single commands. C# lacks those features, so when you attempt to move logic from VB to C#, you can sometimes struggle to replicate the original logic. Sometimes, this can lead to outright errors.

I found this out the hard way, when developing a new C# project based partially on some Visual Basic code I had written earlier. The details of what I went through, including the successful and happy resolution, appear in my article, “It’s All About Character in C# and Visual Basic,” on the Visual Studio Magazine web site.

[Image Credits: Visual Studio Magazine]

LEAVE A REPLY

Please enter your comment!
Please enter your name here