namespace X86Disassembler.X86; /// /// Base class for all x86 instruction operands /// public abstract class Operand { /// /// Gets or sets the type of this operand /// public OperandType Type { get; protected set; } /// /// Gets the size of the operand in bits (8, 16, 32) /// public int Size { get; protected set; } /// /// Sets the size of the operand in bits /// /// The new size in bits (8, 16, 32, or 64) /// The operand instance for method chaining public virtual Operand WithSize(int size) { Size = size; return this; } /// /// Returns a string representation of this operand /// public abstract override string ToString(); }