Browsing 7239 questions and answers with Jon Skeet
I suggest you copy them to a local drive first. I suspect that Bitmap.FromFile may seek around the file (possibly reading redundantly) in a way which isn't a good fit for network drives - whereas just copying the files locally and then... more 3/17/2015 9:50:36 AM
The Task.Delay statement seems to have no effect in the latter case, can i not use it without await keyword? Well you can't use it without doing something with the result. Task.Delay just returns a task that will complete later on.... more 3/17/2015 8:15:45 AM
There are three problems with this code: Player[] player = new Player[userCount]; player[userCount].setName(name); Firstly, you're creating a new array each time - I suspect you want to populate userArray instead. Secondly, you're... more 3/17/2015 7:06:48 AM
I don't believe there's anything built in, but it's easy enough to write. Here's a generic version, but you could make it do just byte arrays easily enough. public static T[] Join<T>(T separator, IEnumerable<T[]> arrays) { ... more 3/16/2015 5:34:24 PM
Hint: you're calling PostAsync, and awaiting the result... but then not doing anything with it. It's not clear why you're using ContinueWith either, when you're in an async world and can just handle it simply: var response = await... more 3/16/2015 2:14:45 PM
No, that's not how you should do it - you're currently parsing from a string to float, then converting that float to a BigDecimal. You clearly know how to get a string from a text field, because you're already doing it in the first line -... more 3/16/2015 1:53:43 PM
# is invalid in a MIME boundary. From RFC 2046: The only mandatory global parameter for the "multipart" media type is the boundary parameter, which consists of 1 to 70 characters from a set of characters known to be very robust... more 3/16/2015 11:29:52 AM
Most LINQ to Objects methods work on the generic IEnumerable<T> type, rather than IEnumerable. Unfortunately, XmlNodeList only implements IEnumerable. It sounds like you're just looking for Cast, which is what the query expression... more 3/16/2015 10:09:54 AM
You're assuming that ClassCImpl is compatible with the T of your ClassB<T>. Suppose I have: public class OtherClassC : ClassC {} ... MainClass mc = new MainClass<ClassB<OtherClassC>,... more 3/16/2015 10:04:51 AM
Well, you're calling FirstOrDefault - that returns null (or rather, the default value for the element type) if the sequence is empty. So you can detect that with a separate statement: @{var sequence =... more 3/15/2015 9:38:36 AM