Browsing 7239 questions and answers with Jon Skeet
For some reason the second where clause won't register. That's because you're not using the return value anywhere. That's just setting up a query, but then ignoring it. No LINQ methods change the value they're called on - instead they... more 6/25/2014 6:36:32 PM
The issue I am experiencing is whenever I access the website from my local PC, the folder is being created in the server and not in my PC. Yes. That's because all your code is being executed on the server. The server just delivers... more 6/25/2014 5:34:11 PM
Date in Java doesn't have ticks - it has milliseconds. Additionally, the epoch for Date is the Unix epoch (1970-01-01) whereas the epoch for DateTime is 0001-01-01. You need to take both of these into account - as well as the fact that the... more 6/25/2014 3:13:01 PM
It sounds like you want something like: var nonInteger = list.Where(x => { int ignored; return !int.TryParse(x.Value, out ignored); ... more 6/25/2014 12:01:14 PM
It's easier to tell what you're doing if you don't just align on dots, but on top-level calls: public static IEnumerable<FileInfo> GetLatestFiles(string path) { return new DirectoryInfo(path) .GetFiles("*.log") ... more 6/25/2014 10:27:02 AM
Just create a lookup with a key of num & 1 (equivalent to num % 2 for positive numbers, but sticking with 1 instead of -1 for negative numbers): var lookup = randNum.ToLookup(num => num & 1); var even =... more 6/25/2014 7:15:33 AM
No - the inner method doesn't return anything, because it throws an exception instead. The outer method simply doesn't have a result to work with. If a method throws an exception, it's generally expected that none of the work in the... more 6/24/2014 5:47:05 PM
Consider non-dynamic code within Repository<T>. It could have: IRepositoryEntry entry = new T(); That's perfectly valid code - but isn't going to work with T=dynamic. You can perform any operation on a value of type dynamic, but... more 6/24/2014 5:31:07 PM
No, Write will always write everything you ask it to. It may be buffered along the way, but you don't need to worry about "rewriting" in the same way as you repeatedly read data. more 6/24/2014 11:31:17 AM
No, the array isn't length 4. The array is of length 3, because it's the result of the split operation. Your code is effectively just: String splitThis = "Hello, World, There"; String[] arr = splitThis.split(","); arr[3] = "YAY"; Once... more 6/24/2014 11:10:06 AM