Program.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. namespace Test
  3. {
  4. class Program
  5. {
  6. static void Main(string[] args)
  7. {
  8. //FileStream fs = new FileStream(@"D:\boot.vmdk", FileMode.OpenOrCreate, FileAccess.ReadWrite);
  9. //{
  10. // fs.CopyToFileAsync(@"D:\1.bak");
  11. // string md5 = fs.GetFileMD5Async().Result;//获取文件的MD5
  12. //}
  13. //Console.WriteLine("复制完成");
  14. //bool isUrl;
  15. //var match = "//music.163.com/#/search/m/?%23%2Fmy%2Fm%2Fmusic%2Fempty=&s=fade&type=1!k".MatchUrl(out isUrl);
  16. //Console.WriteLine(isUrl);
  17. //foreach (Group g in match.Groups)
  18. //{
  19. // if (g.Captures.Count > 0)
  20. // {
  21. // foreach (Capture c in g.Captures)
  22. // {
  23. // Console.WriteLine(c.Index + " : " + c.Value);
  24. // }
  25. // }
  26. // else
  27. // {
  28. // Console.WriteLine(g.Index + " : " + g.Value);
  29. // }
  30. //}
  31. //bool b1 = "512002199509230611".MatchIdentifyCard();//False
  32. //bool b2 = "140108197705058894".MatchIdentifyCard();//True
  33. //Console.WriteLine(b1 + "----" + b2);
  34. //bool isIP;
  35. //"114.114.256.114".MatchInetAddress(out isIP);//False
  36. //"114.114.114.114".MatchInetAddress(out isIP);//True
  37. //Console.WriteLine(isIP);
  38. Console.ReadKey();
  39. }
  40. }
  41. }