TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arvind Singh
322
5.7k
775.1k
How can i set variable value to take on some condition.
Jul 5 2016 7:41 AM
i have a situation in which i have 4 root level types
BH, IN, KW, UK
i declared some values for them
string const BH= "ORG_BH";
string const IN= "ORG_IN"; etc.
I will get this value in begining of program execution ,
later i have some variable need to set in my other class
its path
public class ClsOrgPath
{
public static string path = "BH"; or
"IN" or
"KW" etc
;
}
public class ClslistPath
{
public static string BHcust = "ORG_GLOBAL/ORG_BH/BH_RETAIL/CUS";
public static string BHcustId = "ORG_GLOBAL/ORG_BH/BH_RETAIL/ID";
public static string BHcustAdress = "ORG_GLOBAL/ORG_BH/BH_RETAIL/ADR";
public static string BHcustAccount = "ORG_GLOBAL/ORG_BH/BH_RETAIL/ACC";
public static string BHcustRelation = "ORG_GLOBAL/ORG_BH/BH_RETAIL/REL";
public static string INcust = "ORG_GLOBAL/ORG_IN/IN_RETAIL/CUS";
public static string INcustId = "ORG_GLOBAL/ORG_IN/IN_RETAIL/ID";
public static string INcustAdress = "ORG_GLOBAL/ORG_IN/IN_RETAIL/ADR";
public static string INcustAccount = "ORG_GLOBAL/ORG_IN/IN_RETAIL/ACC";
public static string INcustRelation = "ORG_GLOBAL/ORG_IN/IN_RETAIL/REL";
etc
}
class ClsPrecess
{
here i know
path is BH or IN or UK
need to set this based on
path
string locationpath=
BHcust; //if bh then BHcust if IN then INcust
//
I have many type so can not use if else condition
}
is there any way so i can take value if i select its BH or IN
any solution i will restructure code also.
Reply
Answers (
3
)
how to create three tier appl. using web services in asp.net
PPT containing Video not converting to MP4 Video