Tries to convert itself to a Sofu.Value
Declaration Syntax
C# |
public virtual Value AsValue()
Return Value
Returns itself. But you can be sure it is a Value
Examples
CopyC#
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"); }
Exceptions
Exception | Condition |
---|---|
SofuNotValueException | Gets thrown if the Object is not a Value |