ConfigurationErrorsException.Filename 属性

定义

获取导致引发此配置异常的配置文件的路径。

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

属性值

导致引发此 ConfigurationErrorsException 的配置文件的路径。

示例

下面的代码示例演示如何获取 Filename 属性值。

string fileName = err.Filename;
Console.WriteLine("Filename: {0}", fileName);
Dim fileName As String = err.Filename
Console.WriteLine("Filename: {0}", _
fileName)

适用于