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

C#

 
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 
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 
The nested generic syntax is very powerful, but ugly (but I think there is no rational way around that problem) so errors are often difficult to spot, especially if you haven't used them very much.

The problem in the code snippet is List<float,float> you can only have one generic type in a list (e.g.
List<float> If you want to store two floats this way, you need to create a class with two float properties (Like the example I posted yesterday) e.g.

C#
public class Foo
{
  public float Value1 { get; set; }
  public float Value2 { get; set; }
}

public class Program
{
  public void Main()
  {
    Dictionary<string, List<Foo>> Bar = new Dictionary<string, List<Foo>>();
  }
}


I suggest you research both generics, and the various common collection types (e.g. List, Collection, Dictionary, Linked List, Hashtable, Set etc.). The .Net framework doesn't have all these (e.g. I've had to implement a Set type), but a grounding in each will let you know when to use it and will stand you in good sted in your career.

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

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 
QuestionPowerSheel Pin
satsumatable18-Oct-09 22:08
satsumatable18-Oct-09 22:08 
AnswerRe: PowerSheel Pin
Christian Graus18-Oct-09 22:34
protectorChristian Graus18-Oct-09 22:34 
QuestionOdbcDataReader Pin
viliam18-Oct-09 21:22
viliam18-Oct-09 21:22 
AnswerRe: OdbcDataReader Pin
OriginalGriff18-Oct-09 22:24
mveOriginalGriff18-Oct-09 22:24 

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.