public static ShortBounds ReadShortBounds(this BinaryReader reader) { // Read a ShortBounds object from the stream. ShortBounds bounds = new ShortBounds(); bounds.lower = reader.ReadInt16(); bounds.upper = reader.ReadInt16(); return(bounds); }
public static void Write(this BinaryWriter writer, ShortBounds bounds) { // Write a ShortBounds object to the stream. writer.Write(bounds.lower); writer.Write(bounds.upper); }