Retrives a specifc Sofu.List from the List given by index.
Parameters
- index (Int32)
- Position of the requested List
Return Value
The requested List
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()); Sofu.Sofu.List otherlist = list.list(2); try { Sofu.Sofu.List otherlist2 = list.list(1); } catch (SofuNotListException e) { Console.WriteLine("Second Element of \"list\" is not a List"); Console.WriteLine(e.message); }
Exceptions
Exception | Condition |
---|---|
SofuNoElementException | Will throw SofuNoElementException when the Index is out of the range of the List |
SofuNotListException | Throws a SofuNotListException if the requested element is not a List |