Created
June 23, 2014 15:37
-
-
Save wtuts/150ccad483515ee1badd to your computer and use it in GitHub Desktop.
Databinding in listbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void secondmethod() | |
{ | |
for (int i = 0; i < 8; i++) | |
{ | |
//Create a new object of Result class | |
Resultclass obj = new Resultclass(); | |
//add the corresponding data from the sample array | |
obj.name = studentnames[i]; | |
obj.marks = studentmarks[i]; | |
//add the object directly into the list box | |
mylistbox.Items.Add(obj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment