private static void Sample_ShowSwedishPersonalIdentityNumberTestData() { WriteHeader("A Personal Identity Number that can be used for testing, represented as 10 digit string:"); WriteLine(PersonalIdentityNumberTestData.GetRandom().To10DigitString()); WriteHeader("A Personal Identity Number that can be used for testing, represented as 12 digit string:"); WriteLine(PersonalIdentityNumberTestData.GetRandom().To12DigitString()); WriteHeader("A Personal Identity Number that can be used for testing:"); WriteSwedishPersonalIdentityNumberInfo(PersonalIdentityNumberTestData.GetRandom()); }
static void Main(string[] args) { WriteSection("Sample for SwedishPersonalIdentityNumber, SwedishCoordinationNumber and IndividualIdentityNumber.", false); // SwedishPersonalIdentityNumber WriteSection("Parse Swedish personal identity numbers"); Sample_ParseSwedishPersonalIdentityNumbers(); WriteSection("Parse Swedish personal identity numbers in strict mode"); Sample_ParseSwedishPersonalIdentityNumbers_Strict(PersonalIdentityNumberTestData.AllPinsShuffled().Take(3)); WriteSection("Show Swedish personal identity number test data"); Sample_ShowSwedishPersonalIdentityNumberTestData(); // SwedishCoordinationNumber WriteSection("Parse Swedish coordination numbers"); Sample_ParseSwedishCoordinationNumbers(); WriteSection("Show Swedish coordination number test data"); Sample_ShowSwedishCoordinationNumberTestData(); // IndividualIdentityNumber WriteSection("Parse individual identity numbers"); Sample_ParseIndividualIdentityNumbers(); WriteSection("Parse user input"); Sample_ParseUserInput(); Console.ReadLine(); }