Struct HorizontalMargin
Horizontal margin struct
Namespace
Syntax
public struct HorizontalMargin
Constructors
HorizontalMargin(int, int, int)
Makes a new horizontal margin instance
Declaration
public HorizontalMargin(int left, int right, int width)
Parameters
| Name | Type | Description |
|---|---|---|
| left | int | A left margin |
| right | int | A right margin |
| width | int | Width to subtract from to get margins |
HorizontalMargin(HorizontalPad, int)
Makes a new horizontal margin instance
Declaration
public HorizontalMargin(HorizontalPad margins, int width)
Parameters
| Name | Type | Description |
|---|---|---|
| margins | HorizontalPad | Margins |
| width | int | Width to subtract from to get margins |
Properties
Margins
Gets the margin values
Width
Gets the final width with margins applied
Property Value
int
Declaration
public readonly int Width { get; }
Methods
Equals(object?)
Returns
bool
Declaration
public override bool Equals(object? obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | object |
Overrides
System.ValueType.Equals(object)
Equals(HorizontalMargin)
Returns
bool
Declaration
public bool Equals(HorizontalMargin other)
Parameters
| Name | Type | Description |
|---|---|---|
| other | HorizontalMargin |
GetHashCode()
Returns
int
Declaration
public override int GetHashCode()
Overrides
System.ValueType.GetHashCode()
ToString()
Generates a string containing margin values
Returns
string
Margin values in a string
Declaration
public override string ToString()
Overrides
System.ValueType.ToString()
Operators
operator ==(HorizontalMargin, HorizontalMargin)
Returns
bool
Declaration
public static bool operator ==(HorizontalMargin left, HorizontalMargin right)
Parameters
| Name | Type | Description |
|---|---|---|
| left | HorizontalMargin | |
| right | HorizontalMargin |
operator !=(HorizontalMargin, HorizontalMargin)
Returns
bool
Declaration
public static bool operator !=(HorizontalMargin left, HorizontalMargin right)
Parameters
| Name | Type | Description |
|---|---|---|
| left | HorizontalMargin | |
| right | HorizontalMargin |