Click here to Skip to main content
15,925,400 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I hide a new app started with Button1 Pin
bklynjava118-Dec-05 18:49
bklynjava118-Dec-05 18:49 
QuestionNeed help with how to begin on a project. Pin
Courtesy of Illusion18-Dec-05 13:15
Courtesy of Illusion18-Dec-05 13:15 
AnswerRe: Need help with how to begin on a project. Pin
g00fyman18-Dec-05 13:36
g00fyman18-Dec-05 13:36 
QuestionNeed help with a Struct or Class (array) Pin
flicktom18-Dec-05 12:35
flicktom18-Dec-05 12:35 
AnswerRe: Need help with a Struct or Class (array) Pin
[Marc]18-Dec-05 12:56
[Marc]18-Dec-05 12:56 
GeneralRe: Need help with a Struct or Class (array) Pin
flicktom18-Dec-05 15:46
flicktom18-Dec-05 15:46 
AnswerRe: Need help with a Struct or Class (array) Pin
Guffa18-Dec-05 18:59
Guffa18-Dec-05 18:59 
GeneralRe: Need help with a Struct or Class (array) Pin
flicktom18-Dec-05 20:01
flicktom18-Dec-05 20:01 
Great. That worked (with a minor edit... needed to replace student with ClassStudent).

A recap for any that browse for a solution of this nature...

// This, I actually placed after the "System Generated Object Declarations" for increased scope.
ArrayList students = new ArrayList();

// The while loop...
while (LogReader.Read())
{
// Make a new student
ClassStudent student = new ClassStudent();
// Fill it with data (Added some nullchecking since original post.. not shown)
student.SetKnown(LogReader.GetInt32(0), LogReader.GetString(1));
// Now add the new student to the students arraylist
students.Add(student);

// Now students is filled with each student (duh), and you can still reference it

// Now you can get a student like this:
// With ArrayList you have to cast from object to a ClassStudent
(my apologies for not catching this... thanks for pointing it out in more detail, Guffa Smile | :) )

// Can use this anywhere you like..
((ClassStudent)students[indexNum]).MyMethod();

Thanks a "metric buttload" to both of you.
AnswerRe: Need help with a Struct or Class (array) Pin
Guffa18-Dec-05 13:22
Guffa18-Dec-05 13:22 
GeneralRe: Need help with a Struct or Class (array) Pin
[Marc]18-Dec-05 14:32
[Marc]18-Dec-05 14:32 
QuestionHow to add Timer to class in C# ? Pin
Yanshof18-Dec-05 8:44
Yanshof18-Dec-05 8:44 
AnswerRe: How to add Timer to class in C# ? Pin
Andy Brummer18-Dec-05 13:13
sitebuilderAndy Brummer18-Dec-05 13:13 
QuestionNew Combobox Challenge! Pin
SpeBeeTo18-Dec-05 7:21
SpeBeeTo18-Dec-05 7:21 
QuestionHow set new system date and time in .NET Framework? Pin
Andrey_Mark18-Dec-05 4:39
Andrey_Mark18-Dec-05 4:39 
AnswerRe: How set new system date and time in .NET Framework? Pin
Colin Angus Mackay18-Dec-05 5:16
Colin Angus Mackay18-Dec-05 5:16 
GeneralRe: How set new system date and time in .NET Framework? Pin
Andrey_Mark21-Dec-05 8:11
Andrey_Mark21-Dec-05 8:11 
QuestionInteract Pin
nc3b18-Dec-05 4:23
nc3b18-Dec-05 4:23 
AnswerRe: Interact Pin
Colin Angus Mackay18-Dec-05 5:11
Colin Angus Mackay18-Dec-05 5:11 
GeneralRe: Interact Pin
nc3b19-Dec-05 7:19
nc3b19-Dec-05 7:19 
QuestionAn object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 1:48
ESTAN18-Dec-05 1:48 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:03
S. Senthil Kumar18-Dec-05 2:03 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:06
ESTAN18-Dec-05 2:06 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:11
S. Senthil Kumar18-Dec-05 2:11 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:14
ESTAN18-Dec-05 2:14 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:22
S. Senthil Kumar18-Dec-05 2:22 

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.