SectionInformation.AllowLocation プロパティ
アセンブリ: System.Configuration (system.configuration.dll 内)

Dim instance As SectionInformation Dim value As Boolean value = instance.AllowLocation instance.AllowLocation = value
/** @property */ public boolean get_AllowLocation () /** @property */ public void set_AllowLocation (boolean value)
location 属性を使用できる場合は true。それ以外の場合は false。既定値は true です。

false に設定されている場合、AllowLocation プロパティは、セクションがネイティブ コード リーダーによってアクセスされることを示します。したがって、location 属性は使用できません。これは、ネイティブ コード リーダーが location の概念をサポートしていないためです。

構成ファイル内の関連するセクション情報にアクセスした後に AllowLocation プロパティ値を取得する方法のコード例を次に示します。
SectionInformation を取得します。
' Get the current configuration file. Dim config _ As System.Configuration.Configuration = _ ConfigurationManager.OpenExeConfiguration( _ ConfigurationUserLevel.None) ' Get the section. Dim section As UrlsSection = _ CType(config.GetSection("MyUrls"), UrlsSection) Dim sInfo As SectionInformation = _ section.SectionInformation
// Get the current configuration file. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); // Get the section. UrlsSection section = (UrlsSection)config.GetSection("MyUrls"); SectionInformation sInfo = section.SectionInformation;
AllowLocation 値を取得します。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- SectionInformation.AllowLocation プロパティのページへのリンク