Browsing 7239 questions and answers with Jon Skeet
The list isn't populated with an element at item count. Look at the exception: you've got 20 elements in the list, so the valid indexes are 0 to 19 inclusive. You're asking for record 20 (i.e. the 21st record). That doesn't exist. It... more 10/1/2014 1:05:57 PM
It will execute separately unless you either block waiting for data from the other process (e.g. calling Process.getInputStream() and then reading from it), or call Process.waitFor(). The second process has its own threads - these are not... more 10/1/2014 6:01:06 AM
Specify DateTimeStyles.AssumeUniversal when you parse. If no time zone is specified in the parsed string, the string is assumed to denote a UTC. I'd also use DateTime.ParseExact and specify the invariant culture: var time =... more 9/30/2014 10:00:55 PM
Rather than using a List<Func<T, string>> use a Func<T, string>[] and make it a parameter array: static string OutputCSVString<T>(this IList<T> list, params Func<T,... more 9/30/2014 9:12:45 PM
No, they don't behave quite the same way. Without the static constructor, the timing of exactly when the type initializer executes is much looser - it can happen earlier or later than you'd expect. When there's a static constructor, the... more 9/30/2014 4:36:11 PM
I don't believe there's any direct support for ordinals ("st", "nd", "th") within .NET. If you only need to support English, I suggest you hard code it yourself. For example: string text = string.Format("{0}{1} {2} {3}", dt.Day,... more 9/30/2014 3:11:39 PM
This will cause a NullPointerException because the HashCode of the x and y are different (which is expected because the Integer class keeps a cache of values only between -128 and 127). That's irrelevant. Integer overrides hashCode()... more 9/30/2014 5:51:25 AM
If you want to perform the arithmetic using BigInteger, you should create a BigInteger for each value and then use BigInteger.add. However, you don't need to use strings to do that. You may want to if your input is already a string and it... more 9/29/2014 4:13:20 PM
It depends on what your app uses. If there are extra references which are being copied into your bin directory, you'd need to copy those as well. Likewise if you have other content being copied into the output directory. But yes, if you... more 9/29/2014 9:45:21 AM
I'm guessing that's why the error, but why is it null when obj.ID does not return null? GetProperty() will look for a CLR property on the type. That's not always how a dynamic property access works - DynamicRecord derives from... more 9/29/2014 8:09:32 AM