Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
General.NET Remoting Pin
CodingYoshi4-Apr-08 7:21
CodingYoshi4-Apr-08 7:21 
GeneralMD5 checksum on unmanaged array Pin
bnb4-Apr-08 6:52
bnb4-Apr-08 6:52 
GeneralRe: MD5 checksum on unmanaged array Pin
CodingYoshi4-Apr-08 7:34
CodingYoshi4-Apr-08 7:34 
GeneralDisplay ArrayList in ListBox Pin
hbez4-Apr-08 5:40
hbez4-Apr-08 5:40 
GeneralRe: Display ArrayList in ListBox Pin
Luc Pattyn4-Apr-08 5:50
sitebuilderLuc Pattyn4-Apr-08 5:50 
GeneralRe: Display ArrayList in ListBox Pin
phannon864-Apr-08 5:53
professionalphannon864-Apr-08 5:53 
GeneralRe: Display ArrayList in ListBox Pin
hbez4-Apr-08 6:08
hbez4-Apr-08 6:08 
GeneralRe: Display ArrayList in ListBox Pin
Luc Pattyn4-Apr-08 6:42
sitebuilderLuc Pattyn4-Apr-08 6:42 
Hi,

variables are local to the first {} block that contains their definition, and can not
be touched by anything outside this same {} block.

how could button2 reach the Grade10 ArrayList that you have defined inside button3_Click???

furthermore, the data structures are all wrong: what would happen if you never click
button3 but do click button2. Where would it get its information?

you clearly need to buy and study a tutorial on C# and pay attention to local variables,
class members, etc. And rethink your program structure.

If button3 is intended to add a student to the collection, with information from input boxes,
then:
- why don't you keep the new student collection alive at the class level?
- why don't you add the new student to the lbxShow immediately? (and forget about button2)?

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: Display ArrayList in ListBox Pin
hbez4-Apr-08 20:12
hbez4-Apr-08 20:12 
QuestionListView.SelectedIndexChanged fired too much Pin
C-Scharbe4-Apr-08 5:26
C-Scharbe4-Apr-08 5:26 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
Luc Pattyn4-Apr-08 5:53
sitebuilderLuc Pattyn4-Apr-08 5:53 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
C-Scharbe4-Apr-08 5:59
C-Scharbe4-Apr-08 5:59 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
Luc Pattyn4-Apr-08 6:45
sitebuilderLuc Pattyn4-Apr-08 6:45 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
mav.northwind5-Apr-08 4:16
mav.northwind5-Apr-08 4:16 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
Luc Pattyn5-Apr-08 4:47
sitebuilderLuc Pattyn5-Apr-08 4:47 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
C-Scharbe6-Apr-08 22:26
C-Scharbe6-Apr-08 22:26 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
C-Scharbe6-Apr-08 22:24
C-Scharbe6-Apr-08 22:24 
GeneralRe: ListView.SelectedIndexChanged fired too much Pin
mav.northwind7-Apr-08 7:52
mav.northwind7-Apr-08 7:52 
QuestionRe: ListView.SelectedIndexChanged fired too much Pin
C-Scharbe16-Apr-08 4:20
C-Scharbe16-Apr-08 4:20 
QuestionHow to bind a list to a combobox Pin
baranils4-Apr-08 5:21
baranils4-Apr-08 5:21 
AnswerRe: How to bind a list to a combobox Pin
C-Scharbe4-Apr-08 5:39
C-Scharbe4-Apr-08 5:39 
GeneralRe: How to bind a list to a combobox Pin
baranils4-Apr-08 5:59
baranils4-Apr-08 5:59 
GeneralRe: How to bind a list to a combobox Pin
C-Scharbe4-Apr-08 6:04
C-Scharbe4-Apr-08 6:04 
GeneralRe: How to bind a list to a combobox Pin
baranils4-Apr-08 6:20
baranils4-Apr-08 6:20 
GeneralRe: How to bind a list to a combobox Pin
C-Scharbe4-Apr-08 6:37
C-Scharbe4-Apr-08 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.