protected static int ParseHashSetInt(GameDataParser parser, byte[] bytes, int offset, GameDataBase gameDataObj, string fieldName) { BitConverterUtility.ConvertEndianFrom(bytes, true, offset, 4); var count = BitConverter.ToInt32(bytes, offset); offset += 4; HashSet <int> values = new HashSet <int>(); for (int i = 0; i < count; i++) { BitConverterUtility.ConvertEndianFrom(bytes, true, offset, 4); var value = BitConverter.ToInt32(bytes, offset); offset += 4; values.Add(value); } gameDataObj.SetHashSetInt(fieldName, values); return(offset); }