I am trying to use a private class within my main class to implement following functionality
I want to use all my select queries in this fashion.
Selects.SQL1
Selects.SQL2
So should i create a struct or a Class to achive this.
I want to do the same thing for my message class.
Messages.msg1
Messages.msg2
Please suggest the right way to do it and reason on doign that way.
public class MainClass
{
private
struct Selects
{
public static string SQL1 = "SELECT LOOKUP_TEXT,LOOKUP_TEXT_CAPTION FROM BT_LOOKUP WHERE LOOKUP_TYPE_ID = 242 ORDER BY LOOKUP_TEXT";
public static string SQL2 = "SELECT LOOKUP_TEXT,LOOKUP_TEXT_CAPTION FROM BT_LOOKUP WHERE LOOKUP_TYPE_ID = {0}";
.
.
.
}
//Selects.SQL1;
//string.format(Selects.SQL2,"242");
}
or should I use this way
public class MainClass
{
private class Selects
{
public static string SQL1 = "SELECT LOOKUP_TEXT,LOOKUP_TEXT_CAPTION FROM BT_LOOKUP WHERE LOOKUP_TYPE_ID = 242 ORDER BY LOOKUP_TEXT";
public static string SQL2 = "SELECT LOOKUP_TEXT,LOOKUP_TEXT_CAPTION FROM BT_LOOKUP WHERE LOOKUP_TYPE_ID = {0}";
.
.
.
}
//Selects.SQL1;
//string.format(Selects.SQL2,"242");
}