How to use variable in case statement?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

I have this:
case MyXML.RootAttribute


which is defined in a static class as:
public const string RootAttribute = "ROOT";

The above case doesn't hit until I use:
case "ROOT"

is there a way to keep from hard coding the text?

Thanks,
Brett
 
Back
Top