Skip to content

Instantly share code, notes, and snippets.

@wtuts
Created June 25, 2014 14:02
Show Gist options
  • Save wtuts/89d4173c01880b769be9 to your computer and use it in GitHub Desktop.
Save wtuts/89d4173c01880b769be9 to your computer and use it in GitHub Desktop.
Listbox selected item
//Making a sample list from the data given above
public void makeasamplelist()
{
for (int i = 0; i < 6; i++)
{
//Create a new instace of the class
Resultclass obj = new Resultclass();
//Add the sample data
obj.name = arrayofnames[i];
obj.marks = arrayofmarks[i];
//Add the the item object into the listbox
mylistbox.Items.Add(obj);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment