Click here to Skip to main content
15,888,816 members
Home / Discussions / C#
   

C#

 
AnswerRe: Project deployment Pin
Not Active19-Oct-09 3:34
mentorNot Active19-Oct-09 3:34 
GeneralRe: Project deployment Pin
jashimu19-Oct-09 4:12
jashimu19-Oct-09 4:12 
GeneralRe: Project deployment Pin
Mirko198019-Oct-09 5:43
Mirko198019-Oct-09 5:43 
QuestionUsing dictionaries Pin
Paul Harsent19-Oct-09 3:00
Paul Harsent19-Oct-09 3:00 
AnswerRe: Using dictionaries Pin
Keith Barrow19-Oct-09 3:07
professionalKeith Barrow19-Oct-09 3:07 
GeneralRe: Using dictionaries Pin
Paul Harsent19-Oct-09 3:14
Paul Harsent19-Oct-09 3:14 
GeneralRe: Using dictionaries Pin
Pete O'Hanlon19-Oct-09 3:16
mvePete O'Hanlon19-Oct-09 3:16 
GeneralRe: Using dictionaries Pin
Keith Barrow19-Oct-09 3:39
professionalKeith Barrow19-Oct-09 3:39 
I think you need a class along the lines of


C#
public class RetrievedTiming 
{
  public string Drive { get; set; }
  public DateTime Start { get; set; }
  public DateTime End { get; set; }
  // public string Filepath { get; set; } //Possibly - see post
}


How you store this depends upon whether you only get one timing per file or not. If there is only one timing per file , You could use Dictionary<string, RetrievedTiming> where the string is the filename.

If you have more than one timing per file the dictionary is no good, but you have a choice of either creating a class FileTimings which has the filename as a property and a List<RetrievedTiming> containing the timings from the file, or simply adding the commented Filepath property to the RetrievedTiming class and maintaining a list of this. [Edit] or, in line with Pete's Suggestion you could Have Dictionary<string, List<RetrievedTiming>> [/Edit]

Personally, I'd start with the last option (the List<RetrievedTiming> with the Filepath property)and develop around that (and replace it with the FileTimings based option if it becomes unweildy). One of the good things about the last option is that you can use LINQ to search the timings easily. See here[^] for a very brief introduction to using LINQ to search a list of objects(in this case an array, but it applies to generic lists too).

CCC solved so far: 2 (including a Hard One!)

GeneralRe: Using dictionaries Pin
Paul Harsent19-Oct-09 6:00
Paul Harsent19-Oct-09 6:00 
GeneralRe: Using dictionaries Pin
Keith Barrow19-Oct-09 6:16
professionalKeith Barrow19-Oct-09 6:16 
GeneralRe: Using dictionaries Pin
Paul Harsent19-Oct-09 22:54
Paul Harsent19-Oct-09 22:54 
GeneralRe: Using dictionaries Pin
Keith Barrow19-Oct-09 23:29
professionalKeith Barrow19-Oct-09 23:29 
Questionhow to catch keydown event in datagridview Pin
han275419-Oct-09 2:31
han275419-Oct-09 2:31 
AnswerRe: how to catch keydown event in datagridview Pin
Henry Minute19-Oct-09 4:20
Henry Minute19-Oct-09 4:20 
GeneralRe: how to catch keydown event in datagridview Pin
han275419-Oct-09 13:21
han275419-Oct-09 13:21 
QuestionCheck if MessageBox is on Pin
tamir90119-Oct-09 1:04
tamir90119-Oct-09 1:04 
AnswerRe: Check if MessageBox is on Pin
Christian Graus19-Oct-09 1:07
protectorChristian Graus19-Oct-09 1:07 
GeneralRe: Check if MessageBox is on Pin
tamir90119-Oct-09 1:16
tamir90119-Oct-09 1:16 
GeneralRe: Check if MessageBox is on Pin
Christian Graus19-Oct-09 1:44
protectorChristian Graus19-Oct-09 1:44 
GeneralRe: Check if MessageBox is on Pin
Russ-T19-Oct-09 2:44
Russ-T19-Oct-09 2:44 
QuestionPushing Code to a Server Pin
Yonathan111118-Oct-09 22:56
professionalYonathan111118-Oct-09 22:56 
AnswerRe: Pushing Code to a Server Pin
Giorgi Dalakishvili18-Oct-09 23:05
mentorGiorgi Dalakishvili18-Oct-09 23:05 
AnswerRe: Pushing Code to a Server Pin
Christian Graus18-Oct-09 23:34
protectorChristian Graus18-Oct-09 23:34 
QuestionSave and retrieve an Image from folder Pin
SAINTJAB18-Oct-09 22:42
SAINTJAB18-Oct-09 22:42 
AnswerRe: Save and retrieve an Image from folder Pin
Md. Marufuzzaman18-Oct-09 23:07
professionalMd. Marufuzzaman18-Oct-09 23:07 

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.