次の方法で共有


Connection.Name プロパティ

定義

現在の接続の名前を取得します。

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

プロパティ値

現在の接続の名前。

public string conName(IServiceProvider sp) {
    Connection con = (Connection)sp.GetService(typeof(Connection));
    return con.Name;
}

注釈

サーバーの場合、 プロパティの Name 値はサーバー名になります。 サイトの場合、値はサイト名になります。 アプリケーションの場合、値はアプリケーション名になります。

注意

プロパティが Name サーバー接続下のアプリケーションまたはサイト レベルでアクセスされると、 プロパティはサーバーの名前を返します。

適用対象