PropertyCollection 클래스

정의

DataColumn, DataSet 또는 DataTable에 추가할 수 있는 속성의 컬렉션을 나타냅니다.

public ref class PropertyCollection : System::Collections::Hashtable
public ref class PropertyCollection : System::Collections::Hashtable, ICloneable
public class PropertyCollection : System.Collections.Hashtable
public class PropertyCollection : System.Collections.Hashtable, ICloneable
[System.Serializable]
public class PropertyCollection : System.Collections.Hashtable
type PropertyCollection = class
    inherit Hashtable
    interface ICloneable
type PropertyCollection = class
    inherit Hashtable
[<System.Serializable>]
type PropertyCollection = class
    inherit Hashtable
Public Class PropertyCollection
Inherits Hashtable
Public Class PropertyCollection
Inherits Hashtable
Implements ICloneable
상속
PropertyCollection
특성
구현

예제

다음 예제에서는 에 대한 DataTable 타임스탬프 값을 만들고 에 추가합니다 PropertyCollection.

private void AddTimeStamp()
{
    //Create a new DataTable.
    DataTable table = new DataTable("NewTable");

    //Get its PropertyCollection.
    PropertyCollection properties = table.ExtendedProperties;

    //Add a timestamp value to the PropertyCollection.
    properties.Add("TimeStamp", DateTime.Now);

    // Print the timestamp.
    Console.WriteLine(properties["TimeStamp"]);
}
Private Sub AddTimeStamp()
    'Create a new DataTable.
    Dim table As New DataTable("NewTable")

    'Get its PropertyCollection.
    Dim properties As PropertyCollection = table.ExtendedProperties

    'Add a timestamp value to the PropertyCollection.
    properties.Add("TimeStamp", DateTime.Now)

    'Print the timestamp.
    Console.WriteLine(properties("TimeStamp"))
End Sub

설명

PropertyCollection , DataSet또는 DataTable 클래스의 DataColumn속성을 통해 ExtendedProperties 액세스할 수 있습니다.

를 통해 PropertyCollection, DataSet또는 DataTable 개체에 DataColumn사용자 지정 속성을 추가합니다. 예를 들어 나중에 다른 개체와 비교할 수 있도록 개체를 만드는 시간을 저장할 수 있습니다.

생성자

PropertyCollection()

PropertyCollection 클래스의 새 인스턴스를 초기화합니다.

PropertyCollection(SerializationInfo, StreamingContext)
사용되지 않음.

PropertyCollection 클래스의 새 인스턴스를 초기화합니다.

속성

comparer
사용되지 않음.
사용되지 않음.

IComparer에 사용할 Hashtable를 가져오거나 설정합니다.

(다음에서 상속됨 Hashtable)
Count

Hashtable에 포함된 키/값 쌍의 수를 가져옵니다.

(다음에서 상속됨 Hashtable)
EqualityComparer

IEqualityComparer에 사용할 Hashtable를 가져옵니다.

(다음에서 상속됨 Hashtable)
hcp
사용되지 않음.
사용되지 않음.

해시 코드를 분배할 수 있는 개체를 가져오거나 설정합니다.

(다음에서 상속됨 Hashtable)
IsFixedSize

Hashtable의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Hashtable)
IsReadOnly

Hashtable가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Hashtable)
IsSynchronized

Hashtable에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Hashtable)
Item[Object]

지정된 키에 연결된 값을 가져오거나 설정합니다.

(다음에서 상속됨 Hashtable)
Keys

ICollection의 키를 포함하는 Hashtable을 가져옵니다.

(다음에서 상속됨 Hashtable)
SyncRoot

Hashtable에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

(다음에서 상속됨 Hashtable)
Values

ICollection의 값이 들어 있는 Hashtable을 가져옵니다.

(다음에서 상속됨 Hashtable)

메서드

Add(Object, Object)

지정한 키와 값을 가지는 요소를 Hashtable에 추가합니다.

(다음에서 상속됨 Hashtable)
Clear()

Hashtable에서 요소를 모두 제거합니다.

(다음에서 상속됨 Hashtable)
Clone()

PropertyCollection 개체의 단순 복사본을 만듭니다.

Clone()

Hashtable의 부분 복사본을 만듭니다.

(다음에서 상속됨 Hashtable)
Contains(Object)

Hashtable에 특정 키가 들어 있는지 여부를 확인합니다.

(다음에서 상속됨 Hashtable)
ContainsKey(Object)

Hashtable에 특정 키가 들어 있는지 여부를 확인합니다.

(다음에서 상속됨 Hashtable)
ContainsValue(Object)

Hashtable에 특정 값이 들어 있는지 여부를 확인합니다.

(다음에서 상속됨 Hashtable)
CopyTo(Array, Int32)

Hashtable 요소를 지정한 인덱스의 1차원 Array 인스턴스에 복사합니다.

(다음에서 상속됨 Hashtable)
Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetEnumerator()

IDictionaryEnumerator를 반복하는 Hashtable를 반환합니다.

(다음에서 상속됨 Hashtable)
GetHash(Object)

지정한 키의 해시 코드를 반환합니다.

(다음에서 상속됨 Hashtable)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetObjectData(SerializationInfo, StreamingContext)
사용되지 않음.

ISerializable 인터페이스를 구현하고 Hashtable을 serialize하는 데 필요한 데이터를 반환합니다.

(다음에서 상속됨 Hashtable)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
KeyEquals(Object, Object)

특정 ObjectHashtable의 특정 키와 비교합니다.

(다음에서 상속됨 Hashtable)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnDeserialization(Object)

ISerializable 인터페이스를 구현하고, deserialization이 완료되면 deserialization 이벤트를 발생시킵니다.

(다음에서 상속됨 Hashtable)
Remove(Object)

Hashtable에서 지정한 키를 가지는 요소를 제거합니다.

(다음에서 상속됨 Hashtable)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

IEnumerable.GetEnumerator()

컬렉션을 반복하는 열거자를 반환합니다.

(다음에서 상속됨 Hashtable)

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보