According to here what you are doing is not possible. What you could do maybe would be to have a static class full of constants, maybe something like so:
class Constants
{
public static string name1 = "abc";
public static string name2 = "xyz";
}
...
if (Constants.name1 == "abc")...