Browsing 7239 questions and answers with Jon Skeet
But isn't it should be bit 7 be inverted,not 6? And what hex 40(1000000) doing here? These two questions are related to each other. The documentation is indicating the value that they mean by "bit 6". Basically, they're using the... more 2/18/2016 11:51:44 AM
Yes, this is a problem with the architecture of IFormatProvider, basically - which we don't handle as well as we might. Both DateTimeFormatInfo and CultureInfo implement IFormatProvider, but in order to perform formatting in some cases, we... more 2/18/2016 7:15:19 AM
Just set it in the constructor: public partial class Test { public int Id { get; set; } public string Test1 { get; set; } public int Active { get; set; } public Test() { Active = 1; } } I think that's... more 2/17/2016 4:38:57 PM
The problem is how you're invoking the program. If you run: java Calculator 5 * 10 then in some command shells, the * will be automatically expanded to all filenames in the current directory. You should be able to fix this with quoting,... more 2/17/2016 9:32:41 AM
Maybe does it exist only one object? Yes, exactly. A single object is created, which immediately is of the type specified (Y in this case). All fields (across the inheritance hierarchy) are initially set to the default values of their... more 2/17/2016 9:24:32 AM
You can call GetInvocationList on a delegate, but an event isn't a delegate - an event is just a consistent way of exposing "subscribe" and "unsubscribe" operations, and a simple way of implementing those operations (using... more 2/16/2016 4:13:07 PM
You just need to provide the key in the new dictionary as well, which in your case is the key of the group. Given that you don't appear to need the keys within the original dictionary, I'd write this as: var pieDictionary =... more 2/16/2016 11:26:15 AM
Your area and circumference variables are only being set if you call the appropriate calculation methods (calcArea and calcCircumference). You're not calling them, so they have the default values of 0. You could fix this in your main... more 2/16/2016 7:21:10 AM
FormattableString is a new type in .NET 4.6, and the compiler will only use it if you try to use it. In other words, the type of an interpolated string literal is normally string - built with string.Format - but can be FormattableString... more 2/16/2016 7:09:58 AM
The second is fine, because of this rule in JLS 8.4.8.3: If a method declaration d1 with return type R1 overrides or hides the declaration of another method d2 with return type R2, then d1 must be return-type-substitutable (ยง8.4.5) for... more 2/15/2016 4:51:58 PM