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

C#

 
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 
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 
afronaut wrote:
I needed to have a hashtable of months of the year:
"January","1"
"February","2"
...
and be able to get a month based on a numeric index OR an index based on a month string.


static string PrintMonth(int i)
{
   return new DateTime(0).AddMonths(i).ToString("MMMM");
}

static int PrintMonthNr(string month)
{
   for (int i = 0; i < 12; i++) 
   {
      if (PrintMonth(i) == month) return i;
   }
   return -1;//some impossiblerroroccured
}


Smile | :)

"I dont have a life, I have a program."
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 
GeneralRe: Transparency Pin
Paul Watson11-Nov-02 2:11
sitebuilderPaul Watson11-Nov-02 2:11 
GeneralRe: Transparency Pin
MrEyes11-Nov-02 3:35
MrEyes11-Nov-02 3:35 
GeneralRe: Transparency Pin
MrEyes11-Nov-02 4:03
MrEyes11-Nov-02 4:03 
GeneralRe: How do i find if user clik "ok" on my Modal Dialog? Pin
perlmunger8-Nov-02 4:24
perlmunger8-Nov-02 4: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.