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 BasicVisual C++F#
public ReadOnlyCollection<PlQueryVariables> ToList()
Public Function ToList As ReadOnlyCollection(Of PlQueryVariables)
public:
ReadOnlyCollection<PlQueryVariables^>^ ToList()
member ToList : unit -> ReadOnlyCollection<PlQueryVariables> 
Return Value
ReadOnlyCollection<(Of <(<'PlQueryVariables>)>)>
A ReadOnlyCollection of PlQueryVariables containing all solutions of the query.
Examples
 Copy imageCopy
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.dll) Version: 1.1.60601.0 (1.1.60601.0)