I hope I can explain what I mean.
namespace BackgroundJob
{
public static class Konstanten
{
public const string closed = "closed";
public const string error = "error";
public static readonly JobStatus jobStatus = new JobStatus();
}
private class JobStatus
{
public string closed { get { return "closed"; } }
public string error { get { return "error"; } }
}
}
I thought it would be better group the constants in case they are used. This is the reason why I created the class "JobStatus". I use the constants in a switch case statements. This works fine:
case Konstanten.error:
but this causes an error:
case Konstanten.jobStatus.error:
ErrorMessage: "A constant value is expected"
Can you tell me how to solve this problem?