I have been trying to return the string of the result but it doesn't return anything. When I do Console.WriteLine it shows the link.
But the line:
s = nzk.Get<string>("link");
doesn't do anything, and I don't know why.
Here's my code:
public string getlink(String ID)
{
ParseClient.Initialize(new ParseClient.Configuration
{
ApplicationId = "xxxxxxxxxxxxxx5335c1fxxx0f19efxxxx06787e",
Server = "http://api.assintates.net/parse/"
});
string s = "";
ParseQuery<ParseObject> query = ParseObject.GetQuery("test");
query.GetAsync(ID).ContinueWith(t =>
{
ParseObject nzk = t.Result;
Console.WriteLine(nzk.Get<string>("link")); // this works
s = nzk.Get<string>("link");// this doesn't work
});
return s;
}
class Program
{
static void Main(string[] args)
{
g_get x = new g_get();
Console.WriteLine(x.getlink("iLQLJKPoJA")); // shows nothing since i initialized the s with ""
Console.ReadLine();
}
}
getlinkin your application? Can you provide some more details?