KOD cpp: UKRYJ
System::Windows::Forms::ListView::ListViewItemCollection ^lvic = gcnew ListView::ListViewItemCollection(listView_2);
MessageBox::Show(lvic->Count.ToString());
for each(ListViewItem ^%lvi in lvic)
{
MessageBox::Show(lvi->Text);
}
MessageBox::Show(lvic->Count.ToString());
for each(ListViewItem ^%lvi in lvic)
{
MessageBox::Show(lvi->Text);
}
i błąd:
|
A first chance exception of type 'System.NullReferenceException' occurred in System.Windows.Forms.dll |
Co robię źle ? Przy MessageBox pisze, że obiekt zawiera 3 elementy, a w pętli nie mogę się odnieść do żadnego, jakby były puste.






