Export (0) Print
Expand All

SectionInformation.Type Property

Gets or sets the section class name.

Namespace: System.Configuration
Assembly: System.Configuration (in system.configuration.dll)

public string Type { get; set; }
/** @property */
public String get_Type ()

/** @property */
public void set_Type (String value)

public function get Type () : String

public function set Type (value : String)

Not applicable.

Property Value

The name of the class that is associated with this ConfigurationSection section.

Exception typeCondition

ArgumentException

The selected value is a null reference (Nothing in Visual Basic) or an empty string ("").

ConfigurationErrorsException

The selected value conflicts with a value that is already defined.

The Type property returns the name of the section class that handles this instance of the ConfigurationSection class.

The following example shows how to get the Type value of a ConfigurationSection object.

static public void GetSectionType()
{
    SectionInformation sInfo =
        GetSectionInformation();

    string sectionType = sInfo.Type;
    Console.WriteLine("Section type: {0}", sectionType);

}

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft