CollectionsMarshal.SetCount<T>(List<T>, Int32) 메서드

정의

의 개수를 List<T> 지정된 값으로 설정합니다.

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)

형식 매개 변수

T

목록에 있는 요소의 유형입니다.

매개 변수

list
List<T>

개수를 설정할 목록입니다.

count
Int32

목록 수를 설정할 값입니다.

예외

listnull입니다.

count가 음수입니다.

설명

개수를 늘리면 초기화되지 않은 데이터가 노출됩니다.

적용 대상