From: Rob V. <rv...@do...> - 2012-06-28 21:34:19
|
What version of dotNetRDF are you using and what platform (e.g. Desktop, Silverlight, Windows Phone) are you targeting? There are methods with those signatures but they are not available across all versions of the library. SparqlRemoteEndpoint relies on synchronous HTTP requests by default and this is not permitted on Silverlight and Windows Phone so you would be forced to use the asynchronous variants of these methods instead. Regards, Rob Vesse From: Nguyen Da <sen...@ya...> Reply-To: <sen...@gm...> Date: Thursday, June 28, 2012 1:17 AM To: Cray Employee <rv...@do...> Subject: Please help me about Basic code : DotnetRDF > Please help me the error following : > > Error 2 : No overload for method 'QueryWithResultGraph' takes 1 arguments > Error 1 : No overload for method 'QueryWithResultSet' takes 1 arguments > > Thank you very much. Regards > > And the code following : > > Program.cs > using System; > using VDS.RDF; > using VDS.RDF.Query; > > public class Progran > { > public static void Main(String[] args) > { > SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new > Uri("http://dbpedia.org/sparql"), "http://dbpedia.org"); > string s="SELECT DISTINCT ?Concept WHERE {[] a ?Concept}"; > SparqlResultSet results = endpoint.QueryWithResultSet(s); > foreach (SparqlResult result in results) > { > Console.WriteLine(result.ToString()); > Console.ReadLine(); > } > > > IGraph g = endpoint.QueryWithResultGraph("DESCRIBE "); > > > foreach (Triple t in g.Triples) > { > Console.WriteLine(t.ToString()); > Console.ReadLine(); > } > } > } > |