Click here to Skip to main content
16,020,973 members
Home / Discussions / C#
   

C#

 
GeneralRe: MDI application Pin
Eric Gunnerson (msft)11-Nov-02 7:44
Eric Gunnerson (msft)11-Nov-02 7:44 
GeneralFileSize Pin
kavehdr8-Nov-02 12:08
kavehdr8-Nov-02 12:08 
GeneralRe: FileSize Pin
ian mariano8-Nov-02 20:03
ian mariano8-Nov-02 20:03 
GeneralC# determinism Pin
AaronStibich8-Nov-02 12:03
AaronStibich8-Nov-02 12:03 
QuestionAaarrrgggghhh what have I done??? Pin
LongRange.Shooter8-Nov-02 9:24
LongRange.Shooter8-Nov-02 9:24 
AnswerRe: Aaarrrgggghhh what have I done??? Pin
LongRange.Shooter8-Nov-02 9:41
LongRange.Shooter8-Nov-02 9:41 
GeneralHashtable Pin
afronaut8-Nov-02 6:57
afronaut8-Nov-02 6:57 
GeneralRe: Hashtable Pin
perlmunger8-Nov-02 7:19
perlmunger8-Nov-02 7:19 
Add a key value pair:
myhas["David"] = "C#";

Get a key by it's value:
string item1 = myhash["David"]

Iterate through all items:
foreach( string key in myhash.Keys )
{
  // 1st iteration key holds "David"
  string item1 = myhash[key];
  // item1 now holds "C#"
}

Determine if hashtable contains a particular key:
if( myhash.Contains("David") )
{
  // do something
}

Determine if hashtable contains a particular value:
if( myhash.ContainsValue("C#") )
{
  // do something
}

In general you won't want to look up a key by it's value since keys are (usually) unique, but values aren't. Does this help?

-Matt

------------------------------------------

The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
GeneralRe: Hashtable Pin
afronaut8-Nov-02 8:51
afronaut8-Nov-02 8:51 
GeneralRe: Hashtable Pin
perlmunger8-Nov-02 9:22
perlmunger8-Nov-02 9:22 
GeneralRe: Hashtable Pin
afronaut8-Nov-02 9:52
afronaut8-Nov-02 9:52 
GeneralRe: Hashtable Pin
leppie8-Nov-02 12:48
leppie8-Nov-02 12:48 
GeneralRe: Hashtable Pin
John Fisher8-Nov-02 11:05
John Fisher8-Nov-02 11:05 
QuestionCan someone verify these assumptions on dialog boxes? Pin
LongRange.Shooter8-Nov-02 6:35
LongRange.Shooter8-Nov-02 6:35 
AnswerRe: Can someone verify these assumptions on dialog boxes? Pin
Daaron8-Nov-02 6:44
Daaron8-Nov-02 6:44 
GeneralRe: Can someone verify these assumptions on dialog boxes? Pin
LongRange.Shooter8-Nov-02 6:48
LongRange.Shooter8-Nov-02 6:48 
AnswerRe: Can someone verify these assumptions on dialog boxes? Pin
Richard Deeming8-Nov-02 6:53
mveRichard Deeming8-Nov-02 6:53 
AnswerRe: Can someone verify these assumptions on dialog boxes? Pin
James T. Johnson8-Nov-02 7:07
James T. Johnson8-Nov-02 7:07 
GeneralTransparency Pin
MrEyes8-Nov-02 6:14
MrEyes8-Nov-02 6:14 
GeneralRe: Transparency Pin
Paul Watson8-Nov-02 6:45
sitebuilderPaul Watson8-Nov-02 6:45 
GeneralRe: Transparency Pin
Andrew Lewis8-Nov-02 8:50
Andrew Lewis8-Nov-02 8:50 
GeneralRe: Transparency Pin
Paul Watson9-Nov-02 5:38
sitebuilderPaul Watson9-Nov-02 5:38 
Generalwin2k can show transparency too ... Pin
Karavaev Denis9-Nov-02 5:33
Karavaev Denis9-Nov-02 5:33 
GeneralRe: win2k can show transparency too ... Pin
Paul Watson9-Nov-02 5:38
sitebuilderPaul Watson9-Nov-02 5:38 
GeneralRe: Transparency Pin
MrEyes11-Nov-02 1:52
MrEyes11-Nov-02 1:52 

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.