You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to get a row from a table by indexing it, this resulted in a null:
var settingsTable= tml["Einstellungen"].AsTable;
var tableRow= settingsTable[0];
There should be a possibility to use an indexer to get the key and its value, like an Dictionary returns it.
With strings this works fine, but integers results into null, but I expected to get something 😉
I added this code to the TomlTable to fix this:
public new KeyValuePair<string, TomlNode> this[int index] { get { if (index > RawTable.Count) return new KeyValuePair<string, TomlNode>(); return RawTable.ElementAt(index); } set { if (index > RawTable.Count) return; RawTable[RawTable.ElementAt(index).Key] = value!.Value; } }
The text was updated successfully, but these errors were encountered:
Thank you for this nice peace of software!
I tried to get a row from a table by indexing it, this resulted in a null:
var settingsTable= tml["Einstellungen"].AsTable;
var tableRow= settingsTable[0];
There should be a possibility to use an indexer to get the key and its value, like an Dictionary returns it.
With strings this works fine, but integers results into null, but I expected to get something 😉
I added this code to the TomlTable to fix this:
public new KeyValuePair<string, TomlNode> this[int index] { get { if (index > RawTable.Count) return new KeyValuePair<string, TomlNode>(); return RawTable.ElementAt(index); } set { if (index > RawTable.Count) return; RawTable[RawTable.ElementAt(index).Key] = value!.Value; } }
The text was updated successfully, but these errors were encountered: