Struttura ReadOnlyList<T>

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

Spazio dei nomi  Microsoft.SqlServer.Management.Sdk.Sfc
Assembly:  Microsoft.SqlServer.Management.Sdk.Sfc (in Microsoft.SqlServer.Management.Sdk.Sfc.dll)

Sintassi

'Dichiarazione
Public Structure ReadOnlyList(Of T) _
    Implements IReadOnlyList(Of T), IReadOnlyCollection(Of T),  _
    IReadOnlyCollection, IEnumerable(Of T), IEnumerable
'Utilizzo
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 non supporta i metodi e i tipi generici.

Parametri di tipo

  • T
    The type of elements in the list.

Nel tipo ReadOnlyList<T> sono esposti i membri seguenti.

Costruttori

  Nome Descrizione
Metodo pubblico ReadOnlyList<T> Initializes a new instance of the ReadOnlyList<T> class with the specified list.

In alto

Proprietà

  Nome Descrizione
Proprietà pubblica Count Gets the number of elements contained in the list.
Proprietà pubblica Item Gets the element at the specified index.

In alto

Metodi

  Nome Descrizione
Metodo pubblico Contains Indicates whether the list contains a specific value.
Metodo pubblico CopyTo Copies the elements of the list to an array, starting at a particular array index.
Metodo pubblico Equals Ereditato da ValueType.
Metodo pubblico GetEnumerator Returns an enumerator that iterates through the list.
Metodo pubblico GetHashCode Ereditato da ValueType.
Metodo pubblico GetType Ereditato da Object.
Metodo pubblico IndexOf Determines the index of a specific item in the list.
Metodo pubblico ToString Ereditato da ValueType.

In alto

Operatori

  Nome Descrizione
Operatore pubblicoMembro statico Implicit(List<T> to ReadOnlyList<T>) Returns an implicit conversion from a list to a read only list.
Operatore pubblicoMembro statico Implicit(array<T[] to ReadOnlyList<T>) Returns an implicit conversion from an array to a list.

In alto

Implementazioni esplicite dell'interfaccia

  Nome Descrizione
Implementazione esplicita dell'interfacciaMetodo privato IEnumerable.GetEnumerator Returns an enumerator that iterates through the list.

In alto

Protezione dei thread

I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.

Vedere anche

Riferimento

Spazio dei nomi Microsoft.SqlServer.Management.Sdk.Sfc