Craig Johnston Craig Johnston - 1 year ago 185
C# Question

C#: how to get first char of a string?

Can the first

of a string be retrieved by doing the following?


Answer Source

Just MyString[0]. This uses the String.Chars indexer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download