Browsing 7239 questions and answers with Jon Skeet
Well, if you use a C# 5 compiler (VS2012/VS2013) and the Microsoft.Bcl NuGet package, you can use CallerMemberNameAttribute with .NET 4. You'll still need to declare the field separately though, because you can't just use an... more 3/5/2014 12:46:23 PM
You're currently trying to interpret the bytes as if they were text encoded using the platform default encoding (UTF-8, ISO-8859-1 or whatever). That's not what you actually want to do at all - you want to convert it back to hex. For... more 3/5/2014 11:52:09 AM
I assume by "it is ok just above" you refer to is: return (p1.getId().compareTo(p2.getId()); That's not returning the ID (which is a Long) - it's returning the result of the compareTo method, which is an int. (See the... more 3/5/2014 11:33:09 AM
Application.Run runs the message loop which basically handles UI events etc until all the visible windows have shut. The method blocks until the message loop has shut down. You need that message loop to be running in order to keep the UI... more 3/5/2014 10:15:30 AM
It's unclear why you'd want to get a review ID at all. You're only interested in the scores for those reviews, right? I suspect you actually want to take part of your first query and part of your second: var averageScoreForCuisine = (from... more 3/5/2014 9:56:28 AM
The problem with what you've tried is just the arguments to the BuildNewContent method - you're providing lambda expressions when they should just be values. So I suspect you want: var obj = m.Select(x => x.ToDictionary(y =>... more 3/5/2014 9:24:22 AM
It sounds like you're trying to check whether the set of characters contained within one string is the same as the set of characters contained within another. That's reasonably easy to achieve with a Set<Character>: static boolean... more 3/5/2014 8:48:39 AM
Nothing will magically create dedicated threads for you, although there are some threads used for IO completion which can come into play, particularly if you don't have a synchronization context that you need to return to. You should... more 3/5/2014 6:52:00 AM
The operators for the primitive types aren't defined in the framework - they're part of the CLI itself; they have their own special instructions, basically. There's no IL involved, no methods, so nothing for a MethodInfo to refer to. If... more 3/4/2014 3:44:50 PM
The JVM specification section 2.6.1 seems to think that it only depends on whether it's a static (class) method or an instance method: The Java Virtual Machine uses local variables to pass parameters on method invocation. On class... more 3/4/2014 2:43:39 PM