CList::GetSize

Restituisce il numero di elementi di elenco.

INT_PTR GetSize( ) const;

Valore restituito

Numero di elementi nell'elenco.

Note

Chiamare questo metodo per recuperare il numero di elementi nell'elenco.Chiamare questo metodo genera lo stesso risultato del metodo CList::GetCount.

Esempio

// Define myList.
CList<CString,CString&> myList;

// Add two elements to the list.
myList.AddHead(CString(_T("ABC")));
myList.AddHead(CString(_T("123")));

// Remove the head element and verify the list.
// NOTE: once the head is removed, the number of
// elements in the list will be one.
CString strHead = myList.RemoveHead();
ASSERT((CString(_T("123")) == strHead) && (myList.GetSize() == 1) && 
   (CString(_T("ABC")) == myList.GetHead()));      

Requisiti

Header: afxtempl.h

Vedere anche

Riferimenti

Classe di CList

Grafico della gerarchia

CList::GetCount