WebApplicationInformation.ApplicationDomain 属性

定义

获取当前应用程序域的名称。

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

属性值

String

获取应用程序域的名称。

示例

下面的代码示例演示如何获取应用程序域名。

public string GetApplicationDomain()
{
    // Get the name of the application domain.
    return (string.Format(
        "Application domain: {0}",
        ApplicationInformation.ApplicationDomain));
}
Public Function GetApplicationDomain() As String
    ' Get the name of the application domain.
    Return String.Format( _
    "Application domain: {0}", _
    ApplicationInformation.ApplicationDomain)
End Function 'GetApplicationDomain

适用于