Issue with .NET Hello World

(Me) #1

I'm 100% new to Neo4j, and a bit of a neophyte in coding as well. I have a project that I want to test the usefulness of a graph database for and have downloaded the Neo4j Community edition. I have been running through some of the tutorials, and I came into an issue with the HelloWorld code used in the .NET example. Particularly this line

return result.Single()[0].As();

Visual Studio 2017 does not understand what type it is supposed to be cast to. After almost an hour of researching (Again I am new to programming), I finally found that the following change worked.

return result.Single()[0].As<string>();

or even

return result.Single()[0]; 

What was the code supposed to be doing? Or is it supposed to be casting to a specific type?

Thank you,
Mike Fontaine


(Michael Hunger) #3

@chris.skardon can you help here? Thx