public string GetText() { string text = this.scintillaControl1.GetText(); while (text.EndsWith("\0")) { text = text.Substring(0, text.Length - 1); } return text; }