CollectionsMarshal.SetCount<T>(List<T>, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the count of the List<T> to the specified value.
public:
generic <typename T>
static void SetCount(System::Collections::Generic::List<T> ^ list, int count);
public static void SetCount<T> (System.Collections.Generic.List<T> list, int count);
static member SetCount : System.Collections.Generic.List<'T> * int -> unit
Public Shared Sub SetCount(Of T) (list As List(Of T), count As Integer)
Type Parameters
- T
The type of the elements in the list.
Parameters
- list
- List<T>
The list to set the count of.
- count
- Int32
The value to set the list's count to.
Exceptions
list
is null
.
count
is negative.
Remarks
When increasing the count, uninitialized data is being exposed.
Applies to
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za