?
2012-07-07 11:19:42 UTC
I know i've been asking a lot of questions lately about C# coding But this should hopefully be the last one.
Okay So I have this list view which contains the details of some teachers, it has these subitems:
Name
Class
Username
Password
The list view is currently filled with teachers and I need a way of copying those that are selected from the list view to an array so I can do some processing with them.
I currently have the following Teacher class setup which works perfectly:
public class Teacher
{
public string TeachersName
{ get; set; }
public string TeachersClass
{ get; set; }
public string TeachersUsername
{ get; set; }
public string TeachersPassword
{ get; set; }
}
I need and array of teachers:
Teacher[] Variablename = new Teacher[lv_Teachers.SelectedItems.Count];
That is the current declaration i have for it.
Please can someone help me with the processing to copy all the selected items into the array.
Thanks!!