using System; namespace GoldPrinter { public class ExceptionInvalidPrinter : Exception { private string _Message = "无效的打印机,请在控制面版中添加打印机!"; public override string Message { get { return this._Message; } } public ExceptionInvalidPrinter() { } public ExceptionInvalidPrinter(string message) { this._Message = message; } } }