public GetCharAt ( Mono.TextEditor.DocumentLocation location ) : char | ||
location | Mono.TextEditor.DocumentLocation | |
return | char |
using Mono.TextEditor; TextDocument document = new TextDocument("Hello, world!"); int index = 7; char character = document.GetCharAt(index); Console.WriteLine(character);
using Mono.TextEditor; TextDocument document = new TextDocument("This is a test."); for (int i = 0; i < document.TextLength; i++) { char character = document.GetCharAt(i); Console.Write(character + " "); }In this example, a new TextDocument object is created with the text "This is a test.". The GetCharAt method is then called for each character in the document, and the resulting characters are printed to the console separated by spaces. The Mono.TextEditor library is part of the Mono project, which provides an open-source implementation of the .NET Framework.
public GetCharAt ( Mono.TextEditor.DocumentLocation location ) : char | ||
location | Mono.TextEditor.DocumentLocation | |
return | char |