如何用手机号码知道移动运营商 [英] How to know the Mobile Operator with the mobile Number
本文介绍了如何用手机号码知道移动运营商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过移动电话号码了解移动运营商
How to know the Mobile Operator with the mobile Number
推荐答案
据我所知,每个公司运营商都保留了最初的4个号码.因此您可以使用表格将号码和操作员名称存储在数据库中,然后根据需要使用.
此示例的用法是:
As per my knowledge initial 4 number are reserved for each company operator.so u can use a table to store number and operator name in your Database and then use according to your requirement.
a sample use of this is:
Console.WriteLine("Enter mobile number with Country code");
string r = Console.ReadLine().Substring(0,4);
Console.WriteLine(r);
switch(r)
{
case "8050":
Console.WriteLine("Docomo");
break;
case "9216":
Console.WriteLine("Hutch");
break;
case "8020":
Console.WriteLine("Vodaphone");
break;
default:
Console.WriteLine("Not in use");
break;
}
Console.ReadLine();
这篇关于如何用手机号码知道移动运营商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文