Export (0) Print
Expand All

© 2004 Microsoft Corporation. All rights reserved.

Strings in C#
When you get right down to it, text editing is really just about string manipulation. One of the reasons I chose C# as the implementation language is that the native string type, or rather the Microsoft .NET System.String object, is extremely flexible, and C# strings are managed objects in .NET.
      In addition to all of the built-in methods I use here, such as String.Length, String.Trim, and String.SubString, nearly all of the other System objects support interaction with the System.String object.
      One example is the System.DateTime object I used in the function InsertDate. I used it to get the current date and format it the way I want it, but notice how easily the ToString member function returns a string. Heavily used functionality, such as string conversion, is built into the .NET Framework. That's just one less thing you have to worry about.

© 2015 Microsoft