private void AddSet(G2Protocol protocol, G2Frame sync, byte name, HashSet <int> set) { if (set != null && set.Count > 0) { protocol.WritePacket(sync, name, set.ToBytes()); } }
public static void Test() { HashSet <int> set = new HashSet <int>(); set.Add(1); set.Add(22); set.Add(433); set.Add(766); var bytes = set.ToBytes(); var checkSet = HashSetFromBytes(bytes, 0, bytes.Length); }
private void AddSet(G2Protocol protocol, G2Frame sync, byte name, HashSet<int> set) { if (set != null && set.Count > 0) protocol.WritePacket(sync, name, set.ToBytes()); }
public static void Test() { HashSet<int> set = new HashSet<int>(); set.Add(1); set.Add(22); set.Add(433); set.Add(766); var bytes = set.ToBytes(); var checkSet = HashSetFromBytes(bytes, 0, bytes.Length); }