PropertyCollection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
또는 DataColumn에 추가할 DataSetDataTable수 있는 속성의 컬렉션을 나타냅니다.
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
- 상속
- 특성
- 구현
예제
다음 예제에서는 a에 대한 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 클래스의 ExtendedPropertiesDataColumnDataSet 속성을 통해 DataTable 액세스할 수 있습니다.
를 통해 사용자 지정 속성을 DataColumn추가 DataSet하거나 DataTable 개체에 PropertyCollection추가합니다. 예를 들어 나중에 다른 개체와 비교할 수 있도록 개체를 만드는 시간을 저장할 수 있습니다.
생성자
| Name | Description |
|---|---|
| PropertyCollection() |
PropertyCollection 클래스의 새 인스턴스를 초기화합니다. |
| PropertyCollection(SerializationInfo, StreamingContext) |
사용되지 않음.
PropertyCollection 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| 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) |
메서드
| Name | Description |
|---|---|
| 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. (다음에서 상속됨 Hashtable) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| KeyEquals(Object, Object) |
에서 특정 Object 키를 특정 키와 비교합니다 Hashtable. (다음에서 상속됨 Hashtable) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| OnDeserialization(Object) |
역직렬화가 ISerializable 완료되면 인터페이스를 구현하고 역직렬화 이벤트를 발생합니다. (다음에서 상속됨 Hashtable) |
| Remove(Object) |
지정된 키를 가진 요소를 .에서 Hashtable제거합니다. (다음에서 상속됨 Hashtable) |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
명시적 인터페이스 구현
| Name | Description |
|---|---|
| IEnumerable.GetEnumerator() |
컬렉션을 반복하는 열거자를 반환합니다. (다음에서 상속됨 Hashtable) |
확장명 메서드
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
쿼리의 병렬 처리를 사용하도록 설정합니다. |
| AsQueryable(IEnumerable) |
IEnumerable IQueryable변환합니다. |
| Cast<TResult>(IEnumerable) |
IEnumerable 요소를 지정된 형식으로 캐스팅합니다. |
| OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable 요소를 필터링합니다. |