public override void Write(aBinaryWriter writer, string value) { if (value.Length > mMultiple) { value = value.Substring(0, mMultiple); } writer.WriteString(value); var count = mMultiple - value.Length; while (count-- > 0) { writer.WriteChar('\0'); } }
public override void Write(aBinaryWriter writer, string value) { aError.Check <ArgumentException>(value.Length <= UInt16.MaxValue, "String value is too long for a WSTR.", "value"); writer.Write16((ushort)value.Length); writer.WriteString(value); }
public override void Write(aBinaryWriter writer, string value) { aError.Check <ArgumentException>(value.Length <= Byte.MaxValue, "String value is too long for a BSTR.", "value"); writer.Write8((byte)value.Length); writer.WriteString(value); }
public override void Write(aBinaryWriter writer, string value) { writer.WriteString(value); writer.WriteChar('\0'); }