Game.Net.SubReplacementSide
Assembly:
Namespace: Game.Net
Type: enum
Base: sbyte
Summary: SubReplacementSide is a small enum used to indicate which side or position a "sub-replacement" operation targets. It has three values: Left, Middle and Right. The enum uses sbyte as its underlying type and assigns explicit numeric values: Left = -1, Middle = 0, Right = 1. The default enum value (0) corresponds to Middle, so default(SubReplacementSide) == SubReplacementSide.Middle.
Fields
-
Left = -1
Left side indicator. Has the underlying numeric value -1 (type sbyte). Typically used to represent a left-side sub-replacement. -
Middle
Middle/center indicator. Has the underlying numeric value 0. This is the enum's default value. -
Right
Right side indicator. Has the underlying numeric value 1 (type sbyte). Typically used to represent a right-side sub-replacement.
Properties
- This enum defines no custom properties.
Constructors
- Enums do not define custom constructors. The implicit default value is
Middle
(0).
Methods
- There are no custom methods defined on this enum. Standard System.Enum methods (ToString, GetValues, etc.) are available.
Usage Example
// Example: deciding behavior based on replacement side
void ApplyReplacement(SubReplacementSide side)
{
switch (side)
{
case SubReplacementSide.Left:
// apply left-side replacement logic
break;
case SubReplacementSide.Middle:
// apply center replacement logic
break;
case SubReplacementSide.Right:
// apply right-side replacement logic
break;
}
}
// Example: storing/sending numeric value
sbyte numeric = (sbyte)SubReplacementSide.Left; // numeric == -1
SubReplacementSide fromNumeric = (SubReplacementSide)numeric;