Browsing 7239 questions and answers with Jon Skeet
In each of your if statements, you're declaring a new local variable, e.g. if (chooseSides.SelectedItem.ToString() == "D4") { D4 _currDie = new D4(); } That initializes the new _currDie variable, but then you hit the end of the... more 7/22/2016 3:54:55 PM
The answer lies in JLS 15.26.1. Basically, this is the order of things in the case of nums[i++] = nums[i+count]; nums is evaluated (as part of the left-hand side) i++ is evaluated to find the index; the result is the original value of... more 7/22/2016 5:10:51 AM
It seems to me that the only problem is that you're grouping twice. I'd expect this to work: var query = from rating in ratings group rating by rating.ArticleTitle into g select new { ... more 7/22/2016 4:49:26 AM
You're calling Elements() on the XDocument, so that's just going to return the root element. You're then calling Element("ItemID") on that root element - asking for an element which doesn't exist. So that will return null, leading to your... more 7/21/2016 7:37:13 PM
No, you can't do this. From section 17.1.3 of the C# Language Specification 5.0: The types of positional and named parameters for an attribute class are limited to the attribute parameter types which are: One of the following... more 7/21/2016 4:02:58 PM
The language itself isn't generally tied to a specific runtime/framework, although some language features do require framework features. (For example, interpolated strings are a bit more flexible on .NET 4.6 than on .NET 2.0 due to the... more 7/18/2016 7:19:04 AM
You're not changing the condition for your while loop - so if it's ever true, it will always be true: string selected = (string)cmbOperation.SelectedItem; while (selected == "ADD") { // Code that doesn't change the value of... more 7/17/2016 12:35:39 PM
The problem is that you're iterating over myMapList, but modifying it while you're iterating: myMapList.add(newMap); I still haven't quite got to grips with what you're trying to do, but fundamentally you shouldn't be adding to the... more 7/16/2016 9:58:02 AM
System.Windows.Forms.Timer.Interval is of type int - it's slightly confusing because System.Timers.Timer.Interval is of type double. So you're trying to assign the result of your method (a double) to a property of type int. That isn't... more 7/16/2016 8:20:44 AM
Where is this data being stored? In the cloud, just as if you were accessing it from the cloud. Just because your application isn't in the cloud doesn't mean that you can't access services in the cloud. Try running your application... more 7/15/2016 8:38:12 PM