What is a string in C#?

Learn about C# String and how to use it.
  • 3295

What is a string in C#?

In any programming language, to represent a value, we need a data type. The Char data type represents a character. In .NET, the text is stored as a sequential read-only collection of Char objects. There is no null-terminating character at the end of a C# string; therefore a C# string can contain any number of embedded null characters ('\0').

In .NET, the System.String data type is used to represent a string. A string in C# is an object of type. The string class in C# represents a string.

Learn how to create a string in C#

Good reference:

Programming C# Strings


More Articles

© 2020 DotNetHeaven. All rights reserved.