Is it OK to use Structs as Data library for harcoded values? Sometimes we can't avoid harcoding somethin althought its better to put it on something like xml file or a database table, but sometimes it's not possible for some reasons..
public struct BatchStatus
{
public const string Submitted = "0901XX";
public const string Active = "62783XY";
public const string Inactive = "S23123";
}
then I use it like this
switch (batchStatus) // enums doesnt work in switch case
{
case BatchStatus.Submitted:
new Batch().Submit(); break;
case BatchStatus.Inactive:
new Batch1().Activate(); break;
case BatchStatus.Active
new Batch2().Deactivate(); break;
}