Browsing 7239 questions and answers with Jon Skeet
It seems to me that you just need a projection from "entry" to "effective fee" which you can sum - something like: var result = source .GroupBy(x => x.Currency) .Select(g => new { Currency = g.Key, Total =... more 5/20/2016 6:00:47 AM
You're looking for a resource which is relative to the LogUtils class. You could use getClass().getResource("/logs") or you could use getClass().getClassLoader().getResource("logs"). (In either case, I'm not 100% convinced it'll work... more 5/19/2016 10:45:17 AM
Well yes, you're asking for the attributes of preference. It sounds like you actually want something like: var defaults = from pref in xDocUser.Descendants("preference") where (string) pref.Attribute("name") ==... more 5/19/2016 10:32:25 AM
What do I need to add to StreetAddress so this works as it did with an anonymous type? Override Equals and GetHashCode, basically. Ideally, implement IEquatable<StreetAddress>, but mostly for the sake of clarity. Your query... more 5/18/2016 11:47:24 AM
No, it's not valid C#. Chances are it's decompiled code that was obfuscated to start with, so using identifiers that are valid in IL but not in C#. Typically, if you're decompiling obfuscated code, you're doing something against the... more 5/17/2016 7:53:36 PM
Is there a reason I can't do this in C#? Yes, but you're not going to like it. The string concatenation involved in char + string involves implicitly calling ToString() on the char. That's not one of the things you can do in a... more 5/17/2016 7:10:44 PM
Yes, the variable that objectA refers to will be - or at least may be garbage collected. There's nothing referring to it any more. (There's no guarantee that it will collected "soon", but it's eligible for garbage collection.) The list... more 5/17/2016 4:13:16 PM
You're looking for the wrong thing at the moment. You should be looking for a CustomField element with a Name element with the specified value: string target = "Scotsm_A_n_Authority_Good"; // Or whatever var xmlAnswers =... more 5/17/2016 9:13:01 AM
Is this some winforms/.Net artifact? Well it's not particularly specific to Windows Forms, in that you could see it anywhere... it just depends on which delegate type was used to declare the event. For example, TabControl.Selected is... more 5/16/2016 6:25:21 AM
I suspect the problem is that the compile-time type of disJSON["rows"][0]["elements"][0]["status"] is JToken or something like that. If you cast to string, then a) you'll be comparing a string with a string; b) the compiler will use the... more 5/15/2016 8:25:30 PM