Click here to Skip to main content
15,911,646 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I hide a new app started with Button1 Pin
Dave Kreskowiak18-Dec-05 14:51
mveDave Kreskowiak18-Dec-05 14:51 
GeneralRe: How can I hide a new app started with Button1 Pin
bklynjava118-Dec-05 15:08
bklynjava118-Dec-05 15:08 
GeneralRe: How can I hide a new app started with Button1 Pin
Dave Kreskowiak18-Dec-05 17:13
mveDave Kreskowiak18-Dec-05 17:13 
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 
Hope i get this straight....

You want to get an array with ClassStudents, and then fill it using LogReader? Ok, let me try:
// Make an arraylist because you don't know the number of students you have
// In .Net 2, you can do List<ClassStudent> or something (then you don't have to cast)
ArrayList students = new ArrayList();
int logCount = 0;

while (LogReader.Read()){
  // Make a new student
  ClassStudent student = new ClassStudent(logCount);
  // Fill it with data
  student.SetKnown(LogReader.GetInt32(0), LogReader.GetString(1));
  // Now add the new student to the students arraylist
  students.Add(student);
  logCount++;
}
// Now students is filled with the students (duh), and you can still reference it
// That's because you've created the students arraylist outside the while loop

// Now you can get a student like this:
// With ArrayList you have to cast from object to a ClassStudent
// In .Net 2 you dont have to do that with List<ClassStudent> or something
ClassStudent firstStudent = (ClassStudent)students(0);

And structs or classes don't really matter for this, the differences between those are completely different.

HTH! Smile | :)

Pompiedompiedom... Wink | ;)
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick

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 
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 

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.