ConfigurationElementCollection.BaseGet 메서드

정의

지정된 인덱스 위치에 있는 ConfigurationElement를 가져옵니다.

오버로드

BaseGet(Int32)

지정된 인덱스 위치에 있는 구성 요소를 가져옵니다.

BaseGet(Object)

지정된 키가 있는 구성 요소를 반환합니다.

BaseGet(Int32)

Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs

지정된 인덱스 위치에 있는 구성 요소를 가져옵니다.

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

매개 변수

index
Int32

반환할 ConfigurationElement의 인덱스 위치입니다.

반환

지정한 인덱스에 있는 ConfigurationElement입니다.

예외

index0보다 작은 경우

또는

지정된 indexConfigurationElement가 없습니다.

예제

다음 코드 예제에서는 메서드를 호출 하는 방법을 보여 있습니다 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

적용 대상

BaseGet(Object)

Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs

지정된 키가 있는 구성 요소를 반환합니다.

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

매개 변수

key
Object

반환할 요소의 키입니다.

반환

지정된 키가 있는 ConfigurationElement가 있으면 해당 요소이거나, 그렇지 않으면 null입니다.

예제

다음 코드 예제에서는 메서드를 호출 하는 방법을 보여 있습니다 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

설명

메서드는 BaseGet 컬렉션에 지정된 키를 가진 개체가 없 ConfigurationElement 으면 를 반환 null 합니다.

적용 대상