Tries to convert itself to a Sofu.Value

C# |
public virtual Value AsValue()

Returns itself. But you can be sure it is a Value


Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu"); try { foreach (KeyValuePair<string,Sofu.SofuObject> entry in file) { Console.Out.WriteLine(entry.Value.AsValue().ToString()); } } catch (SofuNotValueException e) { Console.Out.WriteLine("That was no Value"); }

Exception | Condition |
---|---|
SofuNotValueException | Gets thrown if the Object is not a Value |