Returns the referent as a Value
Declaration Syntax
C# |
public override Value AsValue()
Return Value
The Referents AsValue()
Examples
CopyC#
Sofu.Sofu.Value val = new Sofu.Sofu.Value("Hello World"); Sofu.Sofu.Reference ref = new Sofu.Sofu.Reference("refval",val); Console.Out.WriteLine(val.AsValue().ToString()); //Writes "Hello World" Console.Out.WriteLine(ref.AsValue().ToString()); //Writes also "Hello World"
Exceptions
Exception | Condition |
---|---|
SofuNoTargetException | Throws a SofuNoTargetException if the target does not exists or is not defined |
SofuNotValueException | Throws a SofuNotValueException if the target is not a Value |