Freigeben über


ReadOnlyList<T>-Struktur

Represents a generic structure that exposes the read-only interface of a list while hides its mutable interface.

Namespace:  Microsoft.SqlServer.Management.Sdk.Sfc
Assembly:  Microsoft.SqlServer.Management.Sdk.Sfc (in Microsoft.SqlServer.Management.Sdk.Sfc.dll)

Syntax

'Declaration
Public Structure ReadOnlyList(Of T) _
    Implements IReadOnlyList(Of T), IReadOnlyCollection(Of T),  _
    IReadOnlyCollection, IEnumerable(Of T), IEnumerable
'Usage
Dim instance As ReadOnlyList(Of T)
public struct ReadOnlyList<T> : IReadOnlyList<T>, 
    IReadOnlyCollection<T>, IReadOnlyCollection, IEnumerable<T>, IEnumerable
generic<typename T>
public value class ReadOnlyList : IReadOnlyList<T>, 
    IReadOnlyCollection<T>, IReadOnlyCollection, IEnumerable<T>, IEnumerable
[<SealedAttribute>]
type ReadOnlyList<'T> =  
    struct 
        interface IReadOnlyList<'T>
        interface IReadOnlyCollection<'T>
        interface IReadOnlyCollection 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript bietet keine Unterstützung für die Verwendung generischer Typen und Methoden.

Typparameter

  • T
    The type of elements in the list.

Der ReadOnlyList<T>-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode ReadOnlyList<T> Initializes a new instance of the ReadOnlyList<T> class with the specified list.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft Count Gets the number of elements contained in the list.
Öffentliche Eigenschaft Item Gets the element at the specified index.

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode Contains Indicates whether the list contains a specific value.
Öffentliche Methode CopyTo Copies the elements of the list to an array, starting at a particular array index.
Öffentliche Methode Equals (Geerbt von ValueType.)
Öffentliche Methode GetEnumerator Returns an enumerator that iterates through the list.
Öffentliche Methode GetHashCode (Geerbt von ValueType.)
Öffentliche Methode GetType (Geerbt von Object.)
Öffentliche Methode IndexOf Determines the index of a specific item in the list.
Öffentliche Methode ToString (Geerbt von ValueType.)

Zum Anfang

Operatoren

  Name Beschreibung
Öffentlicher OperatorStatisches Element Implicit(List<T> to ReadOnlyList<T>) Returns an implicit conversion from a list to a read only list.
Öffentlicher OperatorStatisches Element Implicit(array<T[] to ReadOnlyList<T>) Returns an implicit conversion from an array to a list.

Zum Anfang

Explizite Schnittstellenimplementierungen

  Name Beschreibung
Explizite SchnittstellenimplementierungPrivate Methode IEnumerable.GetEnumerator Returns an enumerator that iterates through the list.

Zum Anfang

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.

Siehe auch

Verweis

Microsoft.SqlServer.Management.Sdk.Sfc-Namespace