Browsing 7239 questions and answers with Jon Skeet
You're trying to call GetFilesAsync() on the result of calling GetFolderAsync() - whereas you should be awaiting the result of GetFolderAsync() and then calling GetFilesAsync() on the result of the await. The return value from... more 11/13/2014 6:01:51 PM
You're picking from 89 random numbers (1-89 inclusive) and trying to find a unique number each time... but you're calling that 90 times. What do you expect the last iteration to do? (To put it another way - you're trying to squeeze 90... more 11/13/2014 5:15:23 PM
We have known, value of element will be clone when we get it from a Map No, it won't. It's unclear exactly how you're seeing your original output, but that's not the normal behaviour. Here's a short but complete example based on your... more 11/13/2014 1:16:30 PM
It looks like you really just want Where instead of SelectMany: public List<IAnimal> GetListOfAnimalsByType(IAnimal.AnimalType animalType) { return animalList.Where(ani => ani.Type == animaleType).ToList(); } SelectMany... more 11/13/2014 12:20:23 PM
I don't understand how it's not a subclass when the scope of the import is over the Calc class so that means the sub classes of those should be able to use them imports. Subclassing and imports are entirely different things. It's... more 11/13/2014 9:47:55 AM
Currently your GUI doesn't change so much as start off right... you don't have a MainWindow method, you have a MainWindow constructor. The UI will only finish updating after that constructor has completed, by which time PosX will be 5... more 11/13/2014 9:28:11 AM
You should change the time zone specifier part of the pattern to X, which is the ISO-8601 time zone (well, UTC offset) specifier: objectConstructor("java.text.SimpleDateFormat","yyyy-MM-dd'T'HH:mm:ss.sssX") That will handle Z and treat... more 11/13/2014 7:21:08 AM
This is the problem: try { int xValue = Integer.parseInt(x); int yValue = Integer.parseInt(y); } catch (NumberFormatException exep) { exep.printStackTrace(); } That's declaring new local variables xValue and yValue, rather... more 11/12/2014 6:42:52 PM
It sounds like you're trying to store points in time, regardless of calendar system or time zone. Those are represented by Instant values in Noda Time. So within most of your code, that's probably what you should use to represent the... more 11/12/2014 5:53:13 PM
Why does the for loop in the GetGradeSum method not require {}? Because its body is a single statement. It's much simpler to understand if you indent your code properly. Your current code is more clearly written as: static double... more 11/12/2014 5:47:30 PM