Browsing 7239 questions and answers with Jon Skeet
A clue lies before your error message: Microsoft (R) Visual Basic Compiler version 8.0.50727.5420 for Microsoft (R) .NET Framework version 2.0.50727.5420 Copyright (c) Microsoft Corporation. All rights reserved. That's an ancient... more 5/30/2016 7:16:15 AM
You can use ValuesSource: [Test] public void TestedEntity_GivenParemeter_Passes( [ValueSource(nameof(FirstSource))] int inputA, [ValueSource(nameof(SecondSource))] int inputB) { if (inputA > 0 && inputB > 0) ... more 5/29/2016 11:46:37 AM
Yes, you're calling Directory.Move, which only has one overload, with two string parameters. It's not clear why/how you expected that to work. I suspect you're missing calls to string.Format, e.g. string source =... more 5/29/2016 11:27:49 AM
Instead of using that constructor, you could use: Set<Integer> set = new HashSet<>(); for (int value : x) { if (!set.add(value)) { // Or whatever you want to do System.out.println("Detected a duplicate... "... more 5/29/2016 9:43:30 AM
Yes, because you're not waiting for the tasks you've scheduled to complete. If you have other unit tests, the threads you've created will still keep executing in the background, but your test will complete because you've not told it to do... more 5/29/2016 9:25:06 AM
You can do so - and it'll show up in the Javadoc, I believe. But it won't force any callers to handle the exception, so you're still basically relying on the users (developers calling your code) to be diligent enough to check the... more 5/29/2016 7:24:22 AM
Is this behavior of async methods part of the language spec Yes it is. From section 10.15.1 of the C# 5 specification: If the function body terminates as the result of an uncaught exception (ยง8.9.5) the exception is recorded in... more 5/28/2016 7:28:13 PM
Here we are clear that the value of developers is string which reference to the memory location of characters. No, it's not. The value of developers is of type Members. It's converted to a string by the Console.WriteLine method.... more 5/28/2016 9:40:27 AM
Is boxed copy remain at that location and cover memory on heap? Yes. After all, there could be other references to it: object o1 = 5; object o2 = o1; int x = (int) o1; x = 10; Console.WriteLine(o2); // Still 5 Boxed values act like... more 5/27/2016 4:52:13 PM
Just model the response like this: public class Response { public bool Success { get; set; } public Dictionary<string, Country> Rates { get; set; } } Then: var response =... more 5/27/2016 1:48:27 PM