Browsing 7239 questions and answers with Jon Skeet
You're using the wrong namespace. The default namespace of the elements (including trkpt) is http://www.topografix.com/GPX/1/1, due to this: xmlns="http://www.topografix.com/GPX/1/1" I would strongly recommend that you change your... more 4/26/2016 5:34:19 PM
This is the problem: await Task.Run(() => { GetProducts(); }); You're not waiting for the task returned by GetProducts() to complete - you're just waiting for the immediate GetProducts() method call to complete. The simplest fix... more 4/26/2016 10:34:12 AM
Why is the second option evaluated? Because you're calling the second() method, in order to provide the value as an argument to orElse(). The value of the argument will be ignored (because you already have a value) but that doesn't... more 4/26/2016 10:01:42 AM
It sounds like the Pages property in your Query class would just need to be a Dictionary<int, Page> or Dictionary<string, Page>. Complete example with the JSON you've provided - I've had to guess at some of the name... more 4/25/2016 9:18:41 PM
This is the documented behaviour of HtmlContainerControl.InnerHtml - in the "exceptions" section, it's documented that it will throw HttpException if: There is more than one HTML server control. - or - The HTML server control is... more 4/25/2016 6:29:38 PM
No. In the example you've given, the compiler will only use TaskCompletionSource<T> (indirectly) for the overall asynchronous operation (DownloadDataAndRenderImageAsync). It's up to the two methods that are called to decide how... more 4/25/2016 4:33:42 PM
I would start by projecting your entity to a name and collection-of-rounds pair. That will then be easier to work with. For example: var query = results .Select(d => new { d.Name, Results =... more 4/25/2016 12:40:33 PM
No - the whole point is that it's a single call to make it simpler to read. If you want to read more gradually (e.g. to update a progress bar) you can just read a chunk at a time with InputStream.read(byte[], int, int) in a loop until... more 4/24/2016 3:06:47 PM
If you look at the documentation for Bitmap.Compress in Xamarin, you'll see that the last parameter is a Stream. The equivalent of ByteArrayOutputStream in .NET is MemoryStream, so your code would be: Bitmap bitmap =... more 4/24/2016 3:01:00 PM
I suspect this is the problem: ListViewItem item = new ListViewItem(strArray[0].ToString()); item.SubItems.Add(strArray[0].ToString()); You're adding the first value twice, once as the "main" item and once as a subitem. Try just... more 4/23/2016 8:27:09 AM