FileNotFoundException.Message 属性

定义

获取解释异常原因的错误消息。Gets the error message that explains the reason for the exception.

public:
 virtual property System::String ^ Message { System::String ^ get(); };
public override string Message { get; }
member this.Message : string
Public Overrides ReadOnly Property Message As String

属性值

String

错误消息。The error message.

注解

如果没有为当前异常的构造函数提供消息,此属性将返回系统提供的错误消息。If no message was supplied to the constructor for the current exception, this property returns a system-supplied error message. 如果该 FileName 属性不为 null ,则消息将包括文件名。If the FileName property is not null, the message includes the file name.

此属性为只读。This property is read-only.

适用于