Sofu Documentation
AsList Method
NamespacesSofu.SofuSofuObjectAsList()()()
Tries to convert itself to a Sofu.List.
Declaration Syntax
C#
public virtual List AsList()
Return Value
Returns itself. But you can be sure it is a List
Examples
CopyC#
Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu");
foreach (KeyValuePair<string,Sofu.SofuObject> entry in file) {
    if (entry.Value.IsList()) {
        foreach (SofuObject e in e.Value.AsList()) { // You don't need to catch exceptions here, IsList() makes sure it is a List.
            if (e.IsValue()) Console.WriteLine(e.AsValue().ToString());
        }
    }
}
Exceptions
ExceptionCondition
SofuNotListExceptionGets thrown if the Object is not a List

Assembly: Sofu (Module: Sofu) Version: 0.2.1.0 (0.2.1.0)