Help with collection ArrayList conversion
Can someone please give me some advise on the following.
I am currently doing a project where I have to store students records and I have to retrieve
these records. This has to be done by using windows forms with C#. My idea is, is to use a
collection array list to store the records. In the form I want to add code for a button
click event that displays the records within the textboxes of the form when a record is
retrieved from the collection array List. The problem that I have however, is how to
convert the entered string to be displayed in the text box. For example, if the entered
string is 'science' and stored in the collection array list called RegList. When I try to
display this string in the text box, the fully qualified name is displayed, i.e
System.Windows.Forms.TextBox, Text: science.
I just want the entered string to be displayed.
This is the conversion code that I use to display the code in the textbox:
txtFirstnm.Text = RegList.ToString();
'txtFirstnm' is the name of the text box and 'RegList' is the collection array list.
I hope someone can assist with this it would be of great help. Thanks
Re: Help with collection ArrayList conversion
Just write txtFirstnm.Text = RegList and not txtFirstnm.Text = RegList.ToString()
|All times are GMT +5.5. The time now is 06:09.|