-
Notifications
You must be signed in to change notification settings - Fork 125
VRage.Game.ModAPI.Ingame.Utilities.MyIniValue
← Index ← Namespace Index
public struct MyIniValue
Represents the value of a single configuration item.
Namespace: VRage.Game.ModAPI.Ingame.Utilities
Assembly: VRage.Game.dll
Represents an empty MyIniValue
Gets the MyIniKey this value was retrieved from
Determines whether this value is empty. Be aware that an empty string is not considered to be an empty value.
MyIniValue(MyIniKey key, string value)
void GetLines(List<string> lines)
Retrieves each individual line of this value into the provided list.
bool ToBoolean(bool defaultValue = default)
Attempts to get this value as a System.Boolean . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
byte ToByte(byte defaultValue = 0)
Attempts to get this value as a System.Byte . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
char ToChar(char defaultValue = default)
Attempts to get this value as a System.Char . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
decimal ToDecimal(decimal defaultValue = 0)
Attempts to get this value as a System.Decimal . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
double ToDouble(double defaultValue = 0)
Attempts to get this value as a System.Double . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
short ToInt16(short defaultValue = 0)
Attempts to get this value as a System.Int16 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
int ToInt32(int defaultValue = 0)
Attempts to get this value as a System.Int32 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
long ToInt64(long defaultValue = 0)
Attempts to get this value as a System.Int64 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
sbyte ToSByte(sbyte defaultValue = 0)
Attempts to get this value as a System.SByte . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
float ToSingle(float defaultValue = 0)
Attempts to get this value as a System.Single . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
Attempts to get this value as a System.String . If the value is empty or cannot be understood as this data type, an empty string will be returned instead.
string ToString(string defaultValue)
Attempts to get this value as a System.String . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
ushort ToUInt16(ushort defaultValue = 0)
Attempts to get this value as a System.UInt16 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
uint ToUInt32(uint defaultValue = 0)
Attempts to get this value as a System.UInt32 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
ulong ToUInt64(ulong defaultValue = 0)
Attempts to get this value as a System.UInt64 . If the value is empty or cannot be understood as this data type, the defaultValue will be returned instead.
bool TryGetBoolean(out bool value)
Attempts to get this value as a System.Boolean . Fills the
value
on success.
bool TryGetByte(out byte value)
Attempts to get this value as a System.Byte . Fills the
value
on success.
bool TryGetChar(out char value)
Attempts to get this value as a System.Char . Fills the
value
on success.
bool TryGetDecimal(out decimal value)
Attempts to get this value as a System.Decimal . Fills the
value
on success.
bool TryGetDouble(out double value)
Attempts to get this value as a System.Double . Fills the
value
on success.
bool TryGetInt16(out short value)
Attempts to get this value as a System.Int16 . Fills the
value
on success.
bool TryGetInt32(out int value)
Attempts to get this value as a System.Int32 . Fills the
value
on success.
bool TryGetInt64(out long value)
Attempts to get this value as a System.Int64 . Fills the
value
on success.
bool TryGetSByte(out sbyte value)
Attempts to get this value as a System.SByte . Fills the
value
on success.
bool TryGetSingle(out float value)
Attempts to get this value as a System.Single . Fills the
value
on success.
bool TryGetString(out string value)
Attempts to get this value as a System.String . Fills the
value
on success.
bool TryGetUInt16(out ushort value)
Attempts to get this value as a System.UInt16 . Fills the
value
on success.
bool TryGetUInt32(out uint value)
Attempts to get this value as a System.UInt32 . Fills the
value
on success.
bool TryGetUInt64(out ulong value)
Attempts to get this value as a System.UInt64 . Fills the
value
on success.
void Write(StringBuilder stringBuilder)
Writes this value as a string to the given string builder.
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!