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

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]

Previous articleReview: America’s Original Sin
Next articleIn Wikipedia We Trust

Tim Patrick is a software architect and developer with more than 30 years of experience in designing and building custom software solutions. He is the author of multiple books on Microsoft technologies, and was selected as a Microsoft MVP for his support to the programming community. Tim earned his degree in computer science from Seattle Pacific University.


Please enter your comment!
Please enter your name here