AvalonStudio.TextEditor.Document.TextDocument.GetCharAt C# (CSharp) Method

GetCharAt() public method

public GetCharAt ( int offset ) : char
offset int
return char
		public char GetCharAt(int offset)
		{
			DebugVerifyAccess(); // frequently called, so must be fast in release builds
			return rope[offset];
		}

Usage Example

 private void CloseBracket(TextEditor.TextEditor editor, TextDocument document, string text)
 {
     if (text[0].IsCloseBracketChar() && editor.CaretIndex < document.TextLength && editor.CaretIndex > 0)
     {
         if (document.GetCharAt(editor.CaretIndex) == text[0])
         {
             document.Replace(editor.CaretIndex - 1, 1, string.Empty);
         }
     }
 }
All Usage Examples Of AvalonStudio.TextEditor.Document.TextDocument::GetCharAt