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