Browsing 7239 questions and answers with Jon Skeet
From the documentation of ReadElementContentAsString: This method reads the start tag, the contents of the element, and moves the reader past the end element tag. So you end up at the start of the next element. You then call Read()... more 7/28/2014 8:37:17 AM
The JVM is basically started using a network port for debugging. This allows the debugger to be on a different machine, which can be very useful at times. Now when you're debugging locally, the JVM has been started on your local machine -... more 7/28/2014 6:03:20 AM
Is this a problem with creating new threads? Sort of. It's a problem with capturing i in a lambda expression, and then changing it. It means that when the thread executes your lambda expression, it takes the current value of i, not... more 7/27/2014 8:32:17 PM
In that case, the continuation executes on any available thread-pool thread. In theory it's up to the awaitable to schedule the continuation appropriately, but generally an awaitable captures the current SynchronizationContext when the... more 7/27/2014 8:16:25 PM
The iterator returned from ArrayList.iterator() in the implementation we're apparently both using only checks for structural modification in calls to next(), not in calls to hasNext(). The latter just looks like this (under Java... more 7/27/2014 12:00:01 PM
This is a problem, at least: insert.ExecuteReader(); That's meant for queries, because you're reading data. (As noted by Steve, it would still work - but it's not Call ExecuteNonQuery instead: insert.ExecuteNonQuery(); Additionally,... more 7/27/2014 8:35:55 AM
It's not entirely clear what you mean, but if you're asking why you hit a breakpoint in the lambda expression in TakeWhile, but you don't hit one within Take, it's just that Take doesn't accept a delegate at all - it just accepts a number.... more 7/27/2014 8:16:53 AM
Suppose the code within the run method modifies a UI element. If you try to execute that code from a non-UI thread, it will fail: all UI operations must be performed in the UI thread (aka the event dispatch... more 7/27/2014 7:25:35 AM
You can't, basically. Default values for parameters have to be compile-time constants. However, if you're happy to use null as a value meaning "use the default" you could have: void FooWithDelegateParam(Func<string, string>... more 7/27/2014 7:11:05 AM
If you're just trying to select the value attribute, you should do that: var values = xDoc.Descendants("item") .Where(x => x.Attribute("id").Value == listBox_Items.Text) .Select(x =>... more 7/26/2014 6:23:40 PM