It appears no items are in your collection when the form is being instantiated, so when you call:
x.nume =lvStud.Items[0].ToString();
...there are no records in .Items
, hence the ArgumentOutOfRangeException
. Be sure your ListView
contains items before this logic is called, or add some logic to trap empty lists.