Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
QuestionHow to go to next window Pin
Yustme14-Oct-06 11:03
Yustme14-Oct-06 11:03 
AnswerRe: How to go to next window Pin
Nader Elshehabi14-Oct-06 13:22
Nader Elshehabi14-Oct-06 13:22 
GeneralRe: How to go to next window Pin
Yustme14-Oct-06 22:46
Yustme14-Oct-06 22:46 
GeneralRe: How to go to next window Pin
sam#15-Oct-06 0:10
sam#15-Oct-06 0:10 
GeneralRe: How to go to next window Pin
Yustme15-Oct-06 0:31
Yustme15-Oct-06 0:31 
Questiondetecting keystrokes...How? Pin
TheCardinal14-Oct-06 3:44
TheCardinal14-Oct-06 3:44 
AnswerRe: detecting keystrokes...How? Pin
Nick Parker14-Oct-06 4:50
protectorNick Parker14-Oct-06 4:50 
GeneralRe: detecting keystrokes...How? Pin
TheCardinal14-Oct-06 6:45
TheCardinal14-Oct-06 6:45 
Questiondata stucture Pin
mcrooks14-Oct-06 2:21
mcrooks14-Oct-06 2:21 
AnswerRe: data stucture Pin
Nick Parker14-Oct-06 4:53
protectorNick Parker14-Oct-06 4:53 
GeneralRe: data stucture Pin
mcrooks14-Oct-06 8:10
mcrooks14-Oct-06 8:10 
AnswerRe: data stucture Pin
User 665814-Oct-06 5:29
User 665814-Oct-06 5:29 
GeneralRe: data stucture Pin
mcrooks14-Oct-06 8:12
mcrooks14-Oct-06 8:12 
GeneralRe: data stucture Pin
User 665814-Oct-06 8:26
User 665814-Oct-06 8:26 
mcrooks wrote:

I basically want to store "player" data in a struct (i guess) or class. I then want to add struct's or classes to the "player" namely "assesment dates". Attached to each date are two struct's or classes that contain various assesment data. Is that what you thought in the first place?


Yes, it's almost the same, but a list will be enough for the players and assesment dates. Something like that:

List<Player> players = new List<Player>();

class Player
{
   public name = "Some Name";
   public List<AssesmentData> data = new List<AssesmentData>();
}

class AssesmentData
{
   // object can virtually be anything, can be casted as needed
   public object data1 = ...
   public object data2 = ...
}


You can modify it like that

// create our player
Player player1 = new Player();
player1.name = "Peter Someone";

// create two tasks
AssesmentData task1 = new AssesmentData();
task1.data1 = "Some string";
task1.data2 = 50;

AssesmentData task2 = new AssesmentData();
task2.data1 = 3.3f
task2.data2 = @"C:\Some\Path";

player1.data.Add(task1;
player1.data.Add(task2);

players.Add(player1);


regards

modified 12-Sep-18 21:01pm.

QuestionDatabound Control Hell Pin
tcss14-Oct-06 1:30
tcss14-Oct-06 1:30 
AnswerRe: Databound Control Hell Pin
sam#14-Oct-06 2:28
sam#14-Oct-06 2:28 
GeneralRe: Databound Control Hell Pin
tcss14-Oct-06 2:36
tcss14-Oct-06 2:36 
GeneralRe: Databound Control Hell Pin
sam#14-Oct-06 23:28
sam#14-Oct-06 23:28 
QuestionProblem with Context Switch Deadlock Pin
cnr36914-Oct-06 0:52
cnr36914-Oct-06 0:52 
AnswerRe: Problem with Context Switch Deadlock Pin
S. Senthil Kumar15-Oct-06 7:41
S. Senthil Kumar15-Oct-06 7:41 
Questionhow to export my DataTable To excel 2003 ? Pin
hdv21214-Oct-06 0:45
hdv21214-Oct-06 0:45 
AnswerRe: how to export my DataTable To excel 2003 ? Pin
Nader Elshehabi14-Oct-06 13:19
Nader Elshehabi14-Oct-06 13:19 
Questionplease help me.... Pin
choorakkuttyil14-Oct-06 0:39
choorakkuttyil14-Oct-06 0:39 
GeneralRe: Useless subject Pin
Guffa14-Oct-06 2:54
Guffa14-Oct-06 2:54 
Questionpicture question Pin
rzvme14-Oct-06 0:34
rzvme14-Oct-06 0:34 

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.