Browsing 7239 questions and answers with Jon Skeet
The only time that new Cup() is called is within the static initializer block for Cups. That will only be executed once, however many instances of Cups you create - indeed, even if you don't create any instances of Cups, so long as you... more 2/21/2015 8:41:51 AM
Well to start with it sounds like you should change your method's return type and parameters - you want a set of letters, after all. And sets have a contains method. So I think you want something like: public static String... more 2/20/2015 6:47:17 PM
It's not clear to me why you'd get a NullPointerException wrapping the IndexOutOfBoundsException, but this is the problem: for (int i = 1; i < messwerte.size(); i ++ ) { g.setColor(Color.MAGENTA); ... more 2/19/2015 7:07:42 PM
The problem is that your JSON contains @ signs in front of some property names. For example: "@MISMOVersionID":"2.4" There are two options here: Fix the JSON to not have that, e.g. "@MISMOVersionID":"2.4" Use JsonPropertyAttribute to... more 2/19/2015 7:04:10 PM
A Unix timestamp is defined as the number of elapsed seconds since the Unix epoch, which was a single point in time - usually defined as midnight on January 1st 1970 UTC. So the timestamp is already global - and the simplest way to... more 2/19/2015 6:35:04 PM
What you're seeing (in the first case) is that you can't unbox from int to float. What you're seeing when casting the dictionary itself is that a Dictionary<string, object> isn't a Dictionary<string, float>, which seems... more 2/19/2015 3:45:03 PM
In the first case, you're using all the infrastructure of dynamic - which doesn't just use reflection to find "real" members, but also uses IDynamicMetaObjectProvider to provide support for members which are only known at execution time.... more 2/19/2015 10:47:06 AM
This is what's killing you: task.Wait(); That's blocking the UI thread until the task has completed - but the task is an async method which is going to try to get back to the UI thread after it "pauses" and awaits an async result. It... more 2/19/2015 8:36:44 AM
It's not just MSDN that uses the term "default constructor" specifically for a constructor which is supplied either "if you don't specify anything else" or "always, for a struct (pre C# 6)" or "always, for a struct, unless you specify your... more 2/19/2015 7:15:04 AM
What does Skeet mean by a static class being both abstract and sealed? I mean that that's the representation in the IL. For example: static class Foo {} Generates IL of: .class public abstract auto ansi sealed beforefieldinit... more 2/18/2015 7:58:18 PM