string s = "hello";
char c = s[1];
// now c == 'e'
See also Substring
, to return more than one character.
More Related Contents:
- Get the index of the nth occurrence of a string?
- What is the difference between String and string in C#?
- Find index of returned list result C#
- Why .NET String is immutable? [duplicate]
- What is the difference between String and string in C#?
- .NET / C# – Convert char[] to string
- Unrecognized escape sequence for path string containing backslashes
- Finding all positions of substring in a larger string in C#
- Splitting a string / number every Nth Character / Number?
- Is String.Contains() faster than String.IndexOf()?
- Is there an alternative to string.Replace that is case-insensitive?
- How the StringBuilder class is implemented? Does it internally create new string objects each time we append?
- How is GetHashCode() of C# string implemented?
- C# testing to see if a string is an integer?
- Need to perform Wildcard (*,?, etc) search on a string using Regex
- Is String a primitive type?
- string.IsNullOrEmpty(string) vs. string.IsNullOrWhiteSpace(string)
- How to know the size of the string in bytes?
- Fastest way to remove white spaces in string
- How to do ToString for a possibly null object?
- String.Format – how it works and how to implement custom formatstrings
- Converting String To Float in C#
- Does String.GetHashCode consider the full string or only part of it?
- Remove characters after specific character in string, then remove substring?
- Byte to Binary String C# – Display all 8 digits
- Convert String^ in c# to CString in c++/CLI
- How to use StringBuilder wisely?
- Format Strings in Console.WriteLine method
- splitting a string based on multiple char delimiters
- what’s the use of string.Clone()?