Browsing 7239 questions and answers with Jon Skeet
Your data doesn't contain a List<PersonObject> - it contains a single PersonObject which in turn contains a List<Person>. So this works fine: var json = File.ReadAllText("test.json"); var obj =... more 9/15/2016 9:56:41 AM
The French CultureInfo's NumberFormatInfo uses space as the NumberGroupSeparator - so this works, for example: Decimal.Parse("1 234,56", CultureInfo.GetCultureInfo("fr-FR")); If you want to use . as a thousands separator, you'll need a... more 9/15/2016 9:26:07 AM
No, you can't do this. String interpolation is performed at compile-time. The compiler examines the interpolated string literal, finds the relevant format strings and converts them to {0} etc. There's nothing similar to perform this at... more 9/15/2016 8:55:00 AM
It means that if you call RegisterBooCompletedHandler(handler) multiple times with the same handler, you still only actually subscribe to the event once for that handler. My guess is that actually you've seen this due to someone working... more 9/14/2016 6:08:09 AM
No, because timestamptz (aka timestamp with time zone) isn't really a timestamp with a time zone, in terms of what's stored... you provide a timestamp and a time zone, and internally it's just stored as a UTC value. It sounds like... more 9/13/2016 2:19:17 PM
No, it's doing the right thing - but you have to understand what at time zone means when you provide it with an expression without a time zone as the left hand side. It's basically interpreting it as a timestamp in the specified time... more 9/13/2016 8:34:41 AM
I would suggest using a lookup instead: ILookup<string, IMyObject> lookup = myObjectsUnsorted.ToLookup(t => t.Category); ILookup<,> is precisely designed to be a "multiple values per key" dictionary. As well as being... more 9/13/2016 7:26:24 AM
Rebase is your friend here: git rebase -i HEAD~4 Replace the second to fourth lines starting with "pick" to "f" for "fixup", and you'll end up with a single commit. more 9/12/2016 8:23:06 PM
S is a compile-time constant, following the rules of JLS 15.28. So any occurrence of S in the code is replaced with the value which is known at compile-time. If you change the type of I to int, you'll see the same for that, too. more 9/12/2016 10:25:51 AM
I suspect the problem is this line: w.OpenRead(s); That's returning a Stream that you never close. Now you could just close it... but it would be better to use it, and not bother with the DownloadFile call: using (Stream responseStream... more 9/12/2016 10:22:21 AM