OK, based on your: "How can i check the constants against the varying values" statement, I'm going to
guess that you want to take these constant values and associate them to different categories represented by the enum.
You could try something like:
enum network
{
Unknown = 0,
Airtel,
ETISALAT,
GLO,
MTN
}
static readonly Dictionary<int, network> NetworkCodeToNetworkMap =
new Dictionary<int, network>(){
{ 0701, network.AIRTEL },
{ 0708, network.AIRTEL },
{ 0802, network.AIRTEL },
{ 0808, network.AIRTEL },
{ 0812, network.AIRTEL },
{ 0809, network.ETISALAT },
{ 0817, network.ETISALAT },
{ 0818, network.ETISALAT },
{ 0909, network.ETISALAT },
{ 0705, network.GLO },
{ 0805, network.GLO },
{ 0807, network.GLO },
{ 0811, network.GLO },
{ 0815, network.GLO },
{ 0703, network.MTN },
{ 0706, network.MTN },
{ 0803, network.MTN },
{ 0806, network.MTN },
{ 0810, network.MTN },
{ 0813, network.MTN },
{ 0814, network.MTN },
{ 0816, network.MTN },
{ 0903 network.MTN }};
Then to associate the number to the enum:
network AssociateToNetwork(int code)
{
network association;
if (NetworkCodeToNetworkMap.TryGetValue(code, out association))
{
return association;
}
return association;
}