ConfigurationElementCollection.BaseGet Metoda

Definice

Získá v zadaném umístění indexu ConfigurationElement .

Přetížení

Name Description
BaseGet(Int32)

Získá konfigurační prvek v zadaném umístění indexu.

BaseGet(Object)

Vrátí prvek konfigurace se zadaným klíčem.

BaseGet(Int32)

Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs

Získá konfigurační prvek v zadaném umístění indexu.

protected public:
 System::Configuration::ConfigurationElement ^ BaseGet(int index);
protected:
 System::Configuration::ConfigurationElement ^ BaseGet(int index);
protected internal System.Configuration.ConfigurationElement BaseGet(int index);
protected System.Configuration.ConfigurationElement BaseGet(int index);
member this.BaseGet : int -> System.Configuration.ConfigurationElement
Protected Friend Function BaseGet (index As Integer) As ConfigurationElement
Protected Function BaseGet (index As Integer) As ConfigurationElement

Parametry

index
Int32

Umístění indexu, které ConfigurationElement se má vrátit.

Návraty

V ConfigurationElement zadaném indexu.

Výjimky

index je menší než 0.

nebo

Zadaná ConfigurationElementhodnota není k index dispozici .

Příklady

Následující příklad kódu ukazuje, jak volat metodu BaseGet .

public UrlConfigElement this[int index]
{
    get
    {
        return (UrlConfigElement)BaseGet(index);
    }
    set
    {
        if (BaseGet(index) != null)
        {
            BaseRemoveAt(index);
        }
        BaseAdd(index, value);
    }
}
Default Public Shadows Property Item(ByVal index As Integer) As UrlConfigElement
    Get
        Return CType(BaseGet(index), UrlConfigElement)
    End Get
    Set(ByVal value As UrlConfigElement)
        If BaseGet(index) IsNot Nothing Then
            BaseRemoveAt(index)
        End If
        BaseAdd(value)
    End Set
End Property

Platí pro

BaseGet(Object)

Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs
Zdroj:
ConfigurationElementCollection.cs

Vrátí prvek konfigurace se zadaným klíčem.

protected public:
 System::Configuration::ConfigurationElement ^ BaseGet(System::Object ^ key);
protected:
 System::Configuration::ConfigurationElement ^ BaseGet(System::Object ^ key);
protected internal System.Configuration.ConfigurationElement BaseGet(object key);
protected System.Configuration.ConfigurationElement BaseGet(object key);
member this.BaseGet : obj -> System.Configuration.ConfigurationElement
Protected Friend Function BaseGet (key As Object) As ConfigurationElement
Protected Function BaseGet (key As Object) As ConfigurationElement

Parametry

key
Object

Klíč prvku, který se má vrátit.

Návraty

Se ConfigurationElement zadaným klíčem, nulljinak .

Příklady

Následující příklad kódu ukazuje, jak volat metodu BaseGet .

new public UrlConfigElement this[string Name]
{
    get
    {
        return (UrlConfigElement)BaseGet(Name);
    }
}
Default Public Shadows ReadOnly Property Item(ByVal Name As String) As UrlConfigElement
    Get
        Return CType(BaseGet(Name), UrlConfigElement)
    End Get
End Property

Poznámky

Metoda BaseGet vrátí null , pokud neexistuje žádný ConfigurationElement objekt se zadaným klíčem v kolekci.

Platí pro