Browsing 7239 questions and answers with Jon Skeet
SSSSSS is parsing a number of milliseconds - not microseconds, as you're expecting. 788810 milliseconds is 13 minutes, 8 seconds and 810 milliseconds. So your result is actually 2014-07-07T18:27:31.810. Yes, this is a really stupid bit... more 7/7/2014 6:46:27 PM
While you can build a comparer to do this with List<T>.Sort, it's much easier to use LINQ, which is built for this sort of thing: sorted = unsorted.OrderBy(x => x.Item1).ThenBy(x => x.Item2).ToList(); If you really want to... more 7/7/2014 6:43:14 PM
It sounds like you want somethng like: private IEnumerable<SelectListItem> GetDistinctOrderedLogs<T> (Func<TraceLogs, T> extraction) { return TraceLogs.OrderBy(extraction) .Select(extraction) ... more 7/7/2014 5:45:47 PM
Given the comment thread - this was about not closing all the resources. You're disposing fs (manually, if no exceptions are thrown) but not x. You should really use using statements for everything like this: using (var stream = await... more 7/7/2014 5:00:21 PM
I'd start by trying to avoid getting it as a string in the first place. Make sure you're using the appropriate data type in Oracle, and you should be able to call GetDateTime on the appropriate DataReader (or whatever you're using). If... more 7/7/2014 4:54:40 PM
The right-hand side of the || operator isn't executed if the left-hand side evaluates to true, as per JLS section 15.24: The conditional-or operator || operator is like | (ยง15.22.2), but evaluates its right-hand operand only if the... more 7/7/2014 4:36:02 PM
SS is just "the number of milliseconds, 0-padded if necessary to give a 2-digit result". So it looks like it's behaving as expected by the documentation. Personally I think it would be more sensible if it were specified (and implemented)... more 7/7/2014 1:19:21 PM
You've got a list of groups there - and I suspect you'll find that one group is never equal to another. I suspect you want to perform the Except operation before the grouping. For example: var numinqtoday = bc.SSRecs.Where(x =>... more 7/7/2014 1:15:31 PM
Firstly, this looks like it's probably a Mono bug in Comparer<T>.Default, which should notice if T implements IComparable<Foo> for some Foo that is either an interface T implements, or a base type of T. For workarounds, four... more 7/7/2014 1:12:52 PM
what argument is out of what range? Well, I'd expect the exception to tell you that - but I'd also expect it to be the second argument. (EDIT: Looking at the exception you actually get, even from .NET, it's actually blaming the first... more 7/7/2014 9:35:13 AM