0

I get a result from query bellow, how I get 18. | query result | code

Thiện Sinh
  • 507
  • 1
  • 4
  • 19
  • 1
    What have you tried? SO is not for writing your code, you have to provide some own affords to get help. – MakePeaceGreatAgain Apr 14 '17 at 18:07
  • sr, i think my question easy to imagin, i had add image of source code – Thiện Sinh Apr 14 '17 at 23:44
  • @ThiệnSinh even if it is easy to imagine, it is your job to make it easier for us to provide you with an answer - remember, we are doing it for free. And please use the editor to insert your code instead of screenshots. – berezovskyi May 01 '17 at 16:03

1 Answers1

0

SparqlResult rows have value nodes: https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20SPARQL#!accessing-values:

INode value = r.Value("var");

Value nodes can be type-checked and cast to a literal node that have Value properties: https://stackoverflow.com/a/40049736/464590

    if (value is ILiteralNode)
    {
        var literal = value as ILiteralNode;
        Console.WriteLine(literal.Value);
    }
Community
  • 1
  • 1
berezovskyi
  • 3,133
  • 2
  • 25
  • 30