コード例 #1
0
ファイル: IntegerName.cs プロジェクト: glenm80/IconInfo
 /// <inheritdoc />
 public override byte[] GetBytes()
 {
     byte[] PropertyValue = new byte[ValueSize];
     Buffer.BlockCopy(BitConverter.GetBytes(ValueSize), 0, PropertyValue, 0, 4);
     Buffer.BlockCopy(BitConverter.GetBytes(ID), 0, PropertyValue, 4, 4);
     Buffer.BlockCopy(TypedPropertyValue.GetBytes(), 0, PropertyValue, 9, TypedPropertyValue.GetBytes().Length);
     return(PropertyValue);
 }
コード例 #2
0
ファイル: StringName.cs プロジェクト: glenm80/IconInfo
 /// <inheritdoc />
 public override byte[] GetBytes()
 {
     byte[] PropertyValue = new byte[ValueSize];
     Buffer.BlockCopy(BitConverter.GetBytes(ValueSize), 0, PropertyValue, 0, 4);
     Buffer.BlockCopy(BitConverter.GetBytes(NameSize), 0, PropertyValue, 4, 4);
     Buffer.BlockCopy(Encoding.Unicode.GetBytes(Name), 0, PropertyValue, 9, 4);
     Buffer.BlockCopy(TypedPropertyValue.GetBytes(), 0, PropertyValue, 9 + (int)NameSize, TypedPropertyValue.GetBytes().Length);
     return(PropertyValue);
 }