Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
AnswerRe: Knowing and tracing application memory consumtion and leaks? Pin
Dave Kreskowiak29-Jul-11 3:31
mveDave Kreskowiak29-Jul-11 3:31 
GeneralRe: Knowing and tracing application memory consumtion and leaks? Pin
Chesnokov Yuriy29-Jul-11 10:01
professionalChesnokov Yuriy29-Jul-11 10:01 
GeneralRe: Knowing and tracing application memory consumtion and leaks? Pin
Dave Kreskowiak29-Jul-11 11:01
mveDave Kreskowiak29-Jul-11 11:01 
QuestionASF Stream VU Meter Pin
jjdacl28-Jul-11 16:30
jjdacl28-Jul-11 16:30 
AnswerRe: ASF Stream VU Meter PinPopular
Keith Barrow28-Jul-11 23:26
professionalKeith Barrow28-Jul-11 23:26 
GeneralRe: ASF Stream VU Meter Pin
BillWoodruff30-Jul-11 2:28
professionalBillWoodruff30-Jul-11 2:28 
AnswerRe: ASF Stream VU Meter Pin
GuyThiebaut29-Jul-11 2:55
professionalGuyThiebaut29-Jul-11 2:55 
QuestionWhat is best way to declare constants set? Pin
JP_Rocks27-Jul-11 19:26
JP_Rocks27-Jul-11 19:26 
Hi,
I have many constants, each recurring as per country and declared in class as below:

class CountryRequests
{
  public const string JAP_ABC="JAP_012686";
  public const string JAP_PQR="JAP_012457";
  public const string JAP_POP="JAP_0178WE";//many more

  public const string US_ABC="US_015788";
  public const string US_PQR="US_077895";
  public const string US_POP="US_8726JI";//many more

  public const string EGN_ABC="GB_678756";
  public const string ENG_PQR="GB_567766";
  public const string ENG_POP="GB_8962KL";//many more
}


and I have multiple functions each accessing string for every country, evaluated as
if(country == 'JAP')
{
//call function with JAP_ABC
}
else if(country == 'US')
{
//call function with US_POP
}
else if(country == 'UK')
{
//call function with ENG_POP
}


occuring multile times.

What is best coding here. I cannot change from CountryRequests class to collection as it is used by multiple projects.
Please advice.
Thank you.
***** Programme comme si dept soutien technique. est plein de tueurs en série et ils savent adresse de votre domicile. *****

AnswerRe: What is best way to declare constants set? Pin
lukeer27-Jul-11 21:13
lukeer27-Jul-11 21:13 
AnswerRe: What is best way to declare constants set? Pin
Rob Philpott27-Jul-11 23:22
Rob Philpott27-Jul-11 23:22 
AnswerRe: What is best way to declare constants set? Pin
Dave Kreskowiak28-Jul-11 2:20
mveDave Kreskowiak28-Jul-11 2:20 
AnswerRe: What is best way to declare constants set? Pin
PIEBALDconsult28-Jul-11 2:51
mvePIEBALDconsult28-Jul-11 2:51 
AnswerRe: What is best way to declare constants set? Pin
Eddy Vluggen28-Jul-11 6:52
professionalEddy Vluggen28-Jul-11 6:52 
AnswerRe: What is best way to declare constants set? Pin
RobCroll28-Jul-11 13:53
RobCroll28-Jul-11 13:53 
AnswerRe: What is best way to declare constants set? Pin
BillWoodruff28-Jul-11 18:09
professionalBillWoodruff28-Jul-11 18:09 
GeneralRe: What is best way to declare constants set? Pin
PIEBALDconsult29-Jul-11 3:01
mvePIEBALDconsult29-Jul-11 3:01 
AnswerRe: What is best way to declare constants set? Pin
BobJanova29-Jul-11 5:31
BobJanova29-Jul-11 5:31 
QuestionC# and SQL Server :: Find Most Common Via Junction Table Pin
Matt U.27-Jul-11 14:25
Matt U.27-Jul-11 14:25 
AnswerRe: C# and SQL Server :: Find Most Common Via Junction Table Pin
Łukasz Nowakowski27-Jul-11 23:28
Łukasz Nowakowski27-Jul-11 23:28 
QuestionHow to close a file? Pin
Member 806979527-Jul-11 8:09
Member 806979527-Jul-11 8:09 
AnswerRe: How to close a file? Pin
Ennis Ray Lynch, Jr.27-Jul-11 9:07
Ennis Ray Lynch, Jr.27-Jul-11 9:07 
AnswerRe: How to close a file? Pin
PIEBALDconsult27-Jul-11 14:44
mvePIEBALDconsult27-Jul-11 14:44 
GeneralRe: How to close a file? Pin
Member 806979529-Jul-11 4:29
Member 806979529-Jul-11 4:29 
GeneralRe: How to close a file? Pin
PIEBALDconsult30-Jul-11 5:18
mvePIEBALDconsult30-Jul-11 5:18 
AnswerRe: How to close a file? Pin
jjdacl28-Jul-11 16:46
jjdacl28-Jul-11 16:46 

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.