Program.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using NB_IOT_UDP_HP_SCOKET.WWKJUtil;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int asdas = DateTime.Compare(DateTime.Now.AddDays(1), DateTime.Now.AddHours(1));
  14. int sa = (int)Math.Floor(Convert.ToDecimal("0.1"));
  15. //int num = 0;
  16. //byte[] datas = new byte[] {0x00,0x3C };
  17. ////datas[num] = 0xA5; num++;
  18. ////datas[num] = 0xA6; num++;
  19. ////datas[num] = 0xA7; num++;
  20. ////ProtocolAnalysisTools.Pack();
  21. //string str = Convert.ToString(datas[0], 16).PadLeft(2, '0') + Convert.ToString(datas[1], 16).PadLeft(2, '0');
  22. //num = Convert.ToInt32(str, 16);
  23. //num = HexTwoToIntHight(datas[0], datas[1]);
  24. StringBuilder sb = new StringBuilder();
  25. int a = sb.Capacity;
  26. haha(CmdType.NoCmd, "123", "456", "789");
  27. }
  28. public static int HexTwoToIntHight(byte b1, byte b2)// 高位在前
  29. {
  30. int num = (b1 << 8) + b2;
  31. return num;
  32. }
  33. public static string haha(CmdType c, params string[] arr)
  34. {
  35. Console.WriteLine(c.ToString());
  36. foreach(var item in arr)
  37. {
  38. Console.WriteLine(item);
  39. }
  40. return "";
  41. }
  42. }
  43. }