ICSharpCode.TextEditor.TextEditorControlBase.CanSaveWithCurrentEncoding C# (CSharp) Метод

CanSaveWithCurrentEncoding() публичный Метод

Gets if the document can be saved with the current encoding without losing data.
public CanSaveWithCurrentEncoding ( ) : bool
Результат bool
		public bool CanSaveWithCurrentEncoding()
		{
			if (encoding == null || Util.FileReader.IsUnicode(encoding))
				return true;
			// not a unicode codepage
			string text = document.TextContent;
			return encoding.GetString(encoding.GetBytes(text)) == text;
		}