public static T TryGetValue <T>(this Nett.TomlTable table, string key, T @default) { if (table.TryGetValue(key, out var obj)) { return(obj.Get <T>()); } else { return(@default); } }
public static bool TryGetValue <T>(this Nett.TomlTable table, string key, out T value) { if (table.TryGetValue(key, out var obj)) { value = obj.Get <T>(); return(true); } else { value = default(T); return(false); } }