PropertyInformationCollection Klass
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Innehåller en samling PropertyInformation objekt. Det går inte att ärva den här klassen.
public ref class PropertyInformationCollection sealed : System::Collections::Specialized::NameObjectCollectionBase
[System.Serializable]
public sealed class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase
[<System.Serializable>]
type PropertyInformationCollection = class
inherit NameObjectCollectionBase
Public NotInheritable Class PropertyInformationCollection
Inherits NameObjectCollectionBase
- Arv
- Attribut
Exempel
Följande kodexempel visar hur du PropertyInformationCollection använder klassen.
// 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)
Kommentarer
Objektet PropertyInformationCollection innehåller en samling PropertyInformation objekt. Ett PropertyInformation objekt innehåller information om ett enskilt attribut i konfigurationen. Objektet PropertyInformationCollection härleds från det associerade NameObjectCollectionBase objektet.
Egenskaper
| Name | Description |
|---|---|
| Count |
Hämtar antalet nyckel/värde-par som finns i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| IsReadOnly |
Hämtar eller anger ett värde som anger om instansen NameObjectCollectionBase är skrivskyddad. (Ärvd från NameObjectCollectionBase) |
| Item[String] |
PropertyInformation Hämtar objektet i samlingen baserat på det angivna egenskapsnamnet. |
| Keys |
Hämtar en NameObjectCollectionBase.KeysCollection instans som innehåller alla nycklar i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
Metoder
| Name | Description |
|---|---|
| BaseAdd(String, Object) |
Lägger till en post med den angivna nyckeln och värdet i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseClear() |
Tar bort alla poster från instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGet(Int32) |
Hämtar värdet för posten vid det angivna indexet för instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGet(String) |
Hämtar värdet för den första posten med den angivna nyckeln från instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGetAllKeys() |
Returnerar en String matris som innehåller alla nycklar i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGetAllValues() |
Returnerar en Object matris som innehåller alla värden i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGetAllValues(Type) |
Returnerar en matris av den angivna typen som innehåller alla värden i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseGetKey(Int32) |
Hämtar nyckeln för posten vid det angivna indexet för instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseHasKeys() |
Hämtar ett värde som anger om instansen NameObjectCollectionBase innehåller poster vars nycklar inte |
| BaseRemove(String) |
Tar bort posterna med den angivna nyckeln från instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseRemoveAt(Int32) |
Tar bort posten vid det angivna indexet för instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseSet(Int32, Object) |
Anger värdet för posten vid det angivna indexet för instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| BaseSet(String, Object) |
Anger värdet för den första posten med den angivna nyckeln i instansen, om den NameObjectCollectionBase hittas. Annars lägger du till en post med den angivna nyckeln och värdet i instansen NameObjectCollectionBase . (Ärvd från NameObjectCollectionBase) |
| CopyTo(PropertyInformation[], Int32) |
Kopierar hela PropertyInformationCollection samlingen till en kompatibel endimensionell Array, med början vid det angivna indexet för målmatrisen. |
| Equals(Object) |
Avgör om det angivna objektet är lika med det aktuella objektet. (Ärvd från Object) |
| GetEnumerator() |
Hämtar ett IEnumerator objekt som används för att iterera genom den här PropertyInformationCollection samlingen. |
| GetHashCode() |
Fungerar som standard-hash-funktion. (Ärvd från Object) |
| GetObjectData(SerializationInfo, StreamingContext) |
Fyller i ett SerializationInfo objekt med de data som behövs för att serialisera instansen PropertyInformationCollection . |
| GetType() |
Hämtar den aktuella instansen Type . (Ärvd från Object) |
| MemberwiseClone() |
Skapar en ytlig kopia av den aktuella Object. (Ärvd från Object) |
| OnDeserialization(Object) |
Implementerar ISerializable gränssnittet och höjer deserialiseringshändelsen när deserialiseringen är klar. (Ärvd från NameObjectCollectionBase) |
| ToString() |
Returnerar en sträng som representerar det aktuella objektet. (Ärvd från Object) |
Explicita gränssnittsimplementeringar
| Name | Description |
|---|---|
| ICollection.CopyTo(Array, Int32) |
Kopierar hela NameObjectCollectionBase till en kompatibel endimensionell Array, med början vid det angivna indexet för målmatrisen. (Ärvd från NameObjectCollectionBase) |
| ICollection.IsSynchronized |
Hämtar ett värde som anger om åtkomsten NameObjectCollectionBase till objektet synkroniseras (trådsäker). (Ärvd från NameObjectCollectionBase) |
| ICollection.SyncRoot |
Hämtar ett objekt som kan användas för att synkronisera åtkomsten NameObjectCollectionBase till objektet. (Ärvd från NameObjectCollectionBase) |
Tilläggsmetoder
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
Möjliggör parallellisering av en fråga. |
| AsQueryable(IEnumerable) |
Konverterar en IEnumerable till en IQueryable. |
| Cast<TResult>(IEnumerable) |
Omvandlar elementen i en IEnumerable till den angivna typen. |
| OfType<TResult>(IEnumerable) |
Filtrerar elementen i en IEnumerable baserat på en angiven typ. |