BadImageFormatException.FileName 属性

获取导致该异常的文件的名称。

**命名空间:**System
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public ReadOnly Property FileName As String
用法
Dim instance As BadImageFormatException
Dim value As String

value = instance.FileName
public string FileName { get; }
public:
property String^ FileName {
    String^ get ();
}
/** @property */
public String get_FileName ()
public function get FileName () : String

属性值

带有无效图像的文件的名称,或一个空引用(如果未向当前实例的构造函数传递任何文件名)。

备注

该属性返回提供给当前实例的构造函数的文件名(如果有的话)。如果没有指定该文件名或者它是空引用(在 Visual Basic 中为 Nothing),则该属性返回空引用。

此属性为只读。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

BadImageFormatException 类
BadImageFormatException 成员
System 命名空间