ToList Method

SWI-Prolog SbsSW.SwiPlCs

Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog ToList Method
SwiPlCs interfaceSbsSW.SwiPlCsPlQueryToList()()()()

Create a ReadOnlyCollection<(Of <(<'T>)>)> of PlQueryVariables.

If calling ToList() all solutions of the query are generated and stored in the Collection.

Declaration Syntax
C# Visual Basic Visual C++
Public Function ToList As ReadOnlyCollection(Of PlQueryVariables)
public:
ReadOnlyCollection<PlQueryVariables^>^ ToList()
Return Value
A ReadOnlyCollection of PlQueryVariables containing all solutions of the query.
Examples
CopyC#
public void Test_multi_goal_ToList()
{
    string mm = "abc";
    var results = from n in new PlQuery("L=[a,b,c], member(A, L)").ToList() 
                  select new { A = (string)n["A"] };
    int i = 0;
    foreach (var t in results)
        Assert.AreEqual(mm[i++].ToString(), t.A);
}

Assembly: SwiPlCs (Module: SwiPlCs) Version: 1.1.60301.0 (1.1.60301.0)