Browsing 7239 questions and answers with Jon Skeet
I'm not yet sure why you're getting that particular error, but the problem is that your method declares that it will return Collection<T>, but you're trying to assign the result to a List<T>. If you change the declaration of... more 10/23/2014 6:00:55 AM
You're using the wrong keys for decrypting. You're encrypting with key B, then encrypting the result with key A. You're then trying to decrypt that result with key B, and the final result with key A. Each time you decrypt, you should be... more 10/22/2014 4:55:46 PM
This is because you're using Scanner.next(), which returns a single token - and which uses whitespace as a token separator by default. Perhaps you should use nextLine() instead, if you want to capture a whole line at a time? As for your... more 10/22/2014 4:40:07 PM
You've only got a constructor accepting int: private SCardErrors(int value) ... but you're trying to call it with an argument of type long: SCARD_S_SUCCESS(0x0L) You either need to change the constructor to accept a long - and... more 10/22/2014 4:13:41 PM
If the task returned by Task.WhenAll has completed, that means all of the tasks that you passed to it have completed too. That in turn means that you can use the Result property of each task, with no risk of it blocking. string details =... more 10/22/2014 2:40:35 PM
Unless the data has been written by ObjectOutputStream, you shouldn't use ObjectInputStream - that's very specific to Java's binary serialization. If this is just binary data, 4 bytes for a 32-bit integer etc, then you probably want... more 10/22/2014 1:17:56 PM
I would suggest: Not using XPath to select elements, but using the Elements() method (etc) instead Using a lookup instead of a Dictionary<string, List<string>>, via ToLookup. A lookup is like a dictionary with multiple values... more 10/22/2014 12:49:44 PM
Yes - you're calling GetContext once, serving that request, then stopping. Instead, you should be calling GetContext in a loop. Depending on whether you want to be able to handle multiple requests concurrently or not, you might have... more 10/22/2014 12:41:14 PM
There's no equivalent of that code within object initializers - you can't specify indexers like that. It's slightly unusual that it works even directly... I'd expect to have to add to a Locations property, rather than there being two... more 10/22/2014 10:29:49 AM
You're specifying the name of the source file. That's not what you provide to the java command - you specify the class name. java HelloWorld This assumes that HelloWorld.class is somewhere on the classpath, which would default to "the... more 10/22/2014 9:58:00 AM