string text = "Hello World!"; char firstChar = text.GetCharAt(0); // returns 'H'
string text = "SharpDevelop"; if (text.GetCharAt(5) == 'D') { Console.WriteLine("The 6th character is 'D'."); }
ITextSource textSource = new StringTextSource("C# programming"); for (int i = 0; i < textSource.TextLength; i++) { char c = textSource.GetCharAt(i); Console.Write(c); }The ITextSource interface is part of the ICSharpCode.TextEditor package library.