Share via


PropertyInformationCollection Kelas

Definisi

Berisi kumpulan PropertyInformation objek. Kelas ini tidak dapat diwariskan.

public ref class PropertyInformationCollection sealed : System::Collections::Specialized::NameObjectCollectionBase
public sealed class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase
[System.Serializable]
public sealed class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase
type PropertyInformationCollection = class
    inherit NameObjectCollectionBase
[<System.Serializable>]
type PropertyInformationCollection = class
    inherit NameObjectCollectionBase
Public NotInheritable Class PropertyInformationCollection
Inherits NameObjectCollectionBase
Warisan
PropertyInformationCollection
Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan PropertyInformationCollection kelas .

// Create EllementInformation object.
ElementInformation elementInfo =
  configSection.ElementInformation;
// Create a PropertyInformationCollection object.
PropertyInformationCollection propertyInfoCollection =
  elementInfo.Properties;
// Create a PropertyInformation object.
PropertyInformation myPropertyInfo =
  propertyInfoCollection["enabled"];
// Display the property value.
Console.WriteLine
  ("anonymousIdentification Section - Enabled: {0}",
  myPropertyInfo.Value);
' Create EllementInformation object.
Dim elementInfo As ElementInformation = _
configSection.ElementInformation()
' Create a PropertyInformationCollection object.
Dim propertyInfoCollection As PropertyInformationCollection = _
elementInfo.Properties()
' Create a PropertyInformation object.
Dim myPropertyInfo As PropertyInformation = _
  propertyInfoCollection("enabled")
' Display the property value.
Console.WriteLine _
  ("anonymousIdentification Section - Enabled: {0}", _
  myPropertyInfo.Value)

Keterangan

Objek PropertyInformationCollection berisi kumpulan PropertyInformation objek. Objek PropertyInformation berisi detail atribut individual dalam konfigurasi. Objek PropertyInformationCollection berasal dari objek terkait NameObjectCollectionBase .

Properti

Count

Mendapatkan jumlah pasangan kunci/nilai yang terkandung dalam NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
IsReadOnly

Mendapatkan atau menetapkan nilai yang menunjukkan apakah NameObjectCollectionBase instans bersifat baca-saja.

(Diperoleh dari NameObjectCollectionBase)
Item[String]

PropertyInformation Mendapatkan objek dalam koleksi, berdasarkan nama properti yang ditentukan.

Keys

Mendapatkan instans NameObjectCollectionBase.KeysCollection yang berisi semua kunci dalam NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)

Metode

BaseAdd(String, Object)

Menambahkan entri dengan kunci dan nilai yang ditentukan ke NameObjectCollectionBase dalam instans.

(Diperoleh dari NameObjectCollectionBase)
BaseClear()

Menghapus semua entri dari NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseGet(Int32)

Mendapatkan nilai entri pada indeks instans yang NameObjectCollectionBase ditentukan.

(Diperoleh dari NameObjectCollectionBase)
BaseGet(String)

Mendapatkan nilai entri pertama dengan kunci yang ditentukan dari NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseGetAllKeys()

Mengembalikan String array yang berisi semua kunci dalam NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseGetAllValues()

Mengembalikan Object array yang berisi semua nilai dalam NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseGetAllValues(Type)

Mengembalikan array dari jenis yang ditentukan yang berisi semua nilai dalam NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseGetKey(Int32)

Mendapatkan kunci entri pada indeks instans yang NameObjectCollectionBase ditentukan.

(Diperoleh dari NameObjectCollectionBase)
BaseHasKeys()

Mendapatkan nilai yang menunjukkan apakah NameObjectCollectionBase instans berisi entri yang kuncinya bukan null.

(Diperoleh dari NameObjectCollectionBase)
BaseRemove(String)

Menghapus entri dengan kunci yang ditentukan dari NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
BaseRemoveAt(Int32)

Menghapus entri pada indeks instans yang NameObjectCollectionBase ditentukan.

(Diperoleh dari NameObjectCollectionBase)
BaseSet(Int32, Object)

Mengatur nilai entri pada indeks NameObjectCollectionBase instans yang ditentukan.

(Diperoleh dari NameObjectCollectionBase)
BaseSet(String, Object)

Mengatur nilai entri pertama dengan kunci yang ditentukan dalam NameObjectCollectionBase instans, jika ditemukan; jika tidak, menambahkan entri dengan kunci dan nilai yang ditentukan ke NameObjectCollectionBase dalam instans.

(Diperoleh dari NameObjectCollectionBase)
CopyTo(PropertyInformation[], Int32)

Menyalin seluruh PropertyInformationCollection koleksi ke satu dimensi Arrayyang kompatibel, dimulai pada indeks array target yang ditentukan.

Equals(Object)

Menentukan apakah objek yang ditentukan sama dengan objek saat ini.

(Diperoleh dari Object)
GetEnumerator()

IEnumerator Mendapatkan objek, yang digunakan untuk melakukan iterasi melalui koleksi iniPropertyInformationCollection.

GetHashCode()

Berfungsi sebagai fungsi hash default.

(Diperoleh dari Object)
GetObjectData(SerializationInfo, StreamingContext)
Kedaluwarsa.

Mengisi objek dengan data yang SerializationInfo diperlukan untuk menserialisasikan PropertyInformationCollection instans.

GetObjectData(SerializationInfo, StreamingContext)
Kedaluwarsa.

ISerializable Mengimplementasikan antarmuka dan mengembalikan data yang diperlukan untuk menserialisasikan NameObjectCollectionBase instans.

(Diperoleh dari NameObjectCollectionBase)
GetType()

Mendapatkan instans Type saat ini.

(Diperoleh dari Object)
MemberwiseClone()

Membuat salinan dangkal dari yang saat ini Object.

(Diperoleh dari Object)
OnDeserialization(Object)

ISerializable Mengimplementasikan antarmuka dan meningkatkan peristiwa deserialisasi saat deserialisasi selesai.

(Diperoleh dari NameObjectCollectionBase)
ToString()

Mengembalikan string yang mewakili objek saat ini.

(Diperoleh dari Object)

Implementasi Antarmuka Eksplisit

ICollection.CopyTo(Array, Int32)

Menyalin seluruh NameObjectCollectionBase ke satu dimensi Arrayyang kompatibel, dimulai dari indeks array target yang ditentukan.

(Diperoleh dari NameObjectCollectionBase)
ICollection.IsSynchronized

Mendapatkan nilai yang menunjukkan apakah akses ke objek disinkronkan NameObjectCollectionBase (utas aman).

(Diperoleh dari NameObjectCollectionBase)
ICollection.SyncRoot

Mendapatkan objek yang dapat digunakan untuk menyinkronkan akses ke NameObjectCollectionBase objek.

(Diperoleh dari NameObjectCollectionBase)

Metode Ekstensi

Cast<TResult>(IEnumerable)

Mentransmisikan elemen dari IEnumerable ke jenis yang ditentukan.

OfType<TResult>(IEnumerable)

Memfilter elemen berdasarkan IEnumerable jenis tertentu.

AsParallel(IEnumerable)

Mengaktifkan paralelisasi kueri.

AsQueryable(IEnumerable)

Mengonversi menjadi IEnumerableIQueryable.

Berlaku untuk

Lihat juga