Retrives a specifc SofuObject from the List given by index
| C# |
public SofuObject Object( int index )
- index (Int32)
- position of the requested object
The requested SofuObject
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
| Exception | Condition |
|---|---|
| SofuNoElementException | Will throw SofuNoElementException when the Index is out of the range of the List |