DataUtil.cs
(开头部分) 243KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace IDCardNumberInterpreter
{
public static class DataUtil
{
public static Dictionary<string, string> ZoneDict = new Dictionary<string, string>();
public static string GetZone(string key)
{
if (ZoneDict.ContainsKey(key))
return ZoneDict[key];
return null;
}
public static DateTime GetDateTime(string birth)
{
return DateTime.ParseExact(birth, "yyyyMMdd", null);
}
public static string GetSex(string sex)
{
if (int.Parse(sex) % 2 == 0)
return "女";
else
return "男";
}
public static string GetVerify(string number)
{
int[] values = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
int sum = 0;
for (int index = 0; index < 17; index++)
sum += int.Parse(number[index].ToString()) * values[index];
switch (sum % 11)
{
case 0: return "1";
case 1: return "0";
case 2: return "X";
case 3: return "9";
case 4: return "8";
case 5: return "7";
case 6: return "6";
case 7: return "5";
case 8: return "4";
case 9: return "3";
case 10: return "2";
default: return "ERROR";
}
}
public static string ToHtml(this StringBuilder sb)
{
sb.Replace("\r\n", "<br />").Replace("\r", "<br />").Replace("\n", "<br />");
return sb.ToString();
}
后面还有 3472 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。