Message 属性

Gets or sets the Exception that contains the message to display.

命名空间:  Microsoft.SqlServer.MessageBox
程序集:  Microsoft.ExceptionMessageBox(在 Microsoft.ExceptionMessageBox.dll 中)

语法

声明
Public Property Message As Exception
    Get
    Set
用法
Dim instance As ExceptionMessageBox
Dim value As Exception

value = instance.Message

instance.Message = value
public Exception Message { get; set; }
public:
property Exception^ Message {
    Exception^ get ();
    void set (Exception^ value);
}
member Message : Exception with get, set
function get Message () : Exception
function set Message (value : Exception)

属性值

类型:System. . :: . .Exception
An Exception object.

注释

The Message, Source, Data, and HelpLink properties of Exception are used for the top-level message, and the InnerException property is used for lower-level properties.

The default value is null Nothing nullptr unit null 引用(在 Visual Basic 中为 Nothing) .

To display the exception message box without handling an exception, create an instance of the Exception object, define the properties to be displayed to the user in the message box, and assign the Exception to the Message property.