Browsing 7239 questions and answers with Jon Skeet
Does it matter, for the robustness of the end result how the byte array is encrypted, Base64, conversion to hexadecimal values, something else? No, not at all. So long as you're encoding it in a lossless format (which both base64 and... more 1/28/2016 11:13:29 AM
You've got a casing issue: class Parentclass That's not the same as the filename ParentClass.class, nor is it the same as the class you're trying to use in ChildClass: class ChildClass extends ParentClass. Java classnames are... more 1/28/2016 11:05:53 AM
TaskEx was just an extra class which initially shipped with the CTPs of the async/await extensions for C# 5 before .NET 4.5 shipped... and is now part of the Async Targeting Pack (aka the Microsoft.Bcl.Async NuGet package) in case you want... more 1/27/2016 3:37:20 PM
Explicit interface implementations always have to have an actual implementation. The trick here is to making that just call a non-explicit (internal) abstract method: public abstract class A_Foo : I_Foo { // Classes outside the... more 1/27/2016 3:05:16 PM
That will happen if args is empty. You can't ask for the first element of an empty array, because there isn't one. You should check the length first: if (args.Length == 0) { // Maybe exit? Is it valid not to specify any... more 1/27/2016 7:25:05 AM
So when calling PropertyInfo.getValue(...) on a value type property I want to not get a copy, but the original object and manipulate it. Then you need access to the field, not the property. Alternatively, you need to call the getter... more 1/27/2016 7:10:40 AM
When you create an array, you have to specify the size. I strongly suspect you want: In in = new In(filename); int nPlanets = in.readInt(); allPlanets = new Planet[nPlanets]; Note that it's odd that you're assigning to a field and... more 1/27/2016 6:57:01 AM
I don't see any need to use a timer here. You can use a Stopwatch: class Example { private static readonly TimeSpan MinInterval = TimeSpan.FromSeconds(3); private readonly Stopwatch stopwatch = new Stopwatch(); // Stopped... more 1/26/2016 12:10:20 PM
In case 2, you actually end up calling int.Equals(int), because ushort is implicitly convertible to int. This overload resolution is performed at compile-time. It's not available in case 3 because the compiler only knows the type of int5... more 1/26/2016 6:59:33 AM
The common reason I experience is this scenario: Master repo on github Fork also on github Clone locally Work happens locally, then is pushed up to the fork. A pull request is then created, and offered for code review. The code review... more 1/25/2016 3:12:51 PM