The simplest C # verification/escalation citizenship number/ID card number

Source: Internet
Author: User

1 using System;
2 using System. Text. RegularExpressions;
3
4 namespace Hongcing
5 {
6 /// <summary>
7 // authenticate your citizenship number/ID card number
8 /// </summary>
9 public static class VerifyIdCard
10 {
11 static readonly int [] iW = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
12 // static readonly char [] szVerCode = {1, 0, X, 9, 8, 7, 6, 5, 4, 3, 2 };
13 static readonly string szVerCode = "10X98765432 ";
14
15 /// <summary>
16 // obtain the verification code
17 /// </summary>
18 /// <param name = "id"> 17-Bit String </param>
19 /// <returns> return verification code </returns>
20 private static char GetVerifyChar (string id)
21 {

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.