Retrives a specifc SofuObject from the List given by index
Declaration Syntax
C# |
public SofuObject Object( int index )
Parameters
- index (Int32)
- position of the requested object
Return Value
The requested SofuObject
Examples
CopyC#
Sofu.Sofu.List list = new Sofu.Sofu.List(); list.AppendElement(new Sofu.Sofu.Value("1")); list.AppendElement(new Sofu.Sofu.Map()); list.AppendElement(new Sofu.Sofu.List()); Console.Out.WriteLine(list.Object(0).TypeString()); //Writes Value Console.Out.WriteLine(list.Object(1).TypeString()); //Writes Map Console.Out.WriteLine(list.Object(2).TypeString()); //Writes List
Exceptions
Exception | Condition |
---|---|
SofuNoElementException | Will throw SofuNoElementException when the Index is out of the range of the List |