Tests if this List is really a List
Declaration Syntax
C# |
public override List AsList()
Return Value
Returns itself but as a Sofu.Sofu.List
Examples
CopyC#
Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu"); try { foreach (KeyValuePair<string,Sofu.SofuObject> entry in file) { Sofu.Sofu.Map mylist = entry.Value.AsList(); foreach (SofuObject e in mylist) { Console.WriteLine(e.AsValue().ToString()); } } } catch (SofuNotListException e) { Console.Out.WriteLine("It was not a List"); } catch (SofuNotValueException e) { Console.Out.WriteLine("Something other than a value in the Lists."); }