示例#1
0
 public void Test_long()
 {
     Assert.AreEqual(unchecked ((long)0x8866442278563412), HostToNetworkOrderHelper.Convert(unchecked ((long)0x1234567822446688)));
 }
示例#2
0
 public void Test_short()
 {
     Assert.AreEqual(unchecked ((short)0x3412), HostToNetworkOrderHelper.Convert(unchecked ((short)0x1234)));
 }
示例#3
0
 public void Test_int()
 {
     Assert.AreEqual(unchecked ((int)0x78563412), HostToNetworkOrderHelper.Convert(unchecked ((int)0x12345678)));
 }
示例#4
0
 private byte[] WriteShort(ushort sValue)
 {
     return(BitConverter.GetBytes(HostToNetworkOrderHelper.Convert((short)sValue)));
 }