SectionInformation クラス
アセンブリ: System.Configuration (system.configuration.dll 内)



ConfigurationSection オブジェクトに関連付けられている SectionInformation を取得する方法のコード例を次に示します。
Public Shared Function GetSectionInformation() _ As 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 Return sInfo End Function 'GetSectionInformation
static public SectionInformation GetSectionInformation() { // 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; return sInfo; }
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="MyUrls" type="Samples.AspNet.UrlsSection, ConfigurationElement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" /> </configSections> <MyUrls name="MyFavorites"> <simple name="Contoso" url="http://www.contoso.com" port="8080" /> <urls> <clear /> <add name="Microsoft" url="http://www.microsoft.com" port="0" /> </urls> </MyUrls> </configuration>

System.Configuration.SectionInformation


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 クラスのページへのリンク