VSM: Overcoming Escape Sequence Envy in Visual Basic and C#

0
488
Visual Studio Magazine

My very first software job used the C programming language. It’s a quirky language in many ways, especially when it comes to things like double pointers. But when I compared it to the BASIC language used in my high school programming classes, I quickly came to appreciate C’s escape sequences, simple shortcuts that allowed you to insert special non-printable characters in the middle of ordinary text content.

C#, a direct descendant of the original C language, still includes those escape sequences. Visual Basic, Microsoft’s other key .NET language, has no intrinsic support for these sequences, and to be frank, it made building more complex strings exactly that: more complex. Adding tabs and line endings to a block of text became a process of keyboard dexterity as you tried to get all of the operators and quotation marks in the right places.

Fortunately, there are alternatives to the plain-Jane strings included in Visual Basic. To learn about the options, read my article, “Overcoming Escape Sequence Envy in Visual Basic and C#,” on the Visual Studio Magazine web site.

[Image Credits: Visual Studio Magazine]

LEAVE A REPLY

Please enter your comment!
Please enter your name here