Browsing 7239 questions and answers with Jon Skeet
It sounds you might just want: Note = x.ContactsActivities .OrderByDescending(o => o.date) .Select(o => o.note) .FirstOrDefault() ?? ""; By putting the projection earlier, it means you end up with the null... more 10/2/2013 4:55:46 PM
The problem is that you've got different assemblies - in one case you've loaded an assembly just from a byte array (which happened to be stored on disk as MyFilePath.dll) and in the other you're referring to the assembly which was loaded... more 10/2/2013 2:08:41 PM
My question are 1) for this anonymous object parameter where I now remove the property names so I don't get the Resharper warnings anymore, how does it know what the property names are since they are passed by value? The names are... more 10/2/2013 2:05:58 PM
Are async/await keywords only usable with VS 2012+ and not usable with the C# compiler, which I could use from command line? No, it's fine to build with csc.exe from the command line, so long as it's the C# 5 compiler (as shipped with... more 10/2/2013 12:43:16 PM
I refuse to put in a "-1" in my code, to wrongly correct the symptoms of what is obviously a mistake. The mistake is your assumption that Calendar.get(Calendar.DAY_OF_WEEK) is localized. It isn't. The mapping between day-of-week and... more 10/2/2013 12:00:08 PM
Your filename ends with .Java - it should be .java. Otherwise the compiler doesn't expect it to be a source file, and tries to process it as a flag instead. more 10/2/2013 10:58:46 AM
Don't convert the raw value to a string in the first place - it should already be a DateTime: DateTime date = (DateTime) dsr["ExpireDate"]; Then you can convert it into whatever format you're interested in: // TODO: Consider specifying... more 10/2/2013 10:55:08 AM
The problem is that you're declaring your own Timer class - so Timer t = new Timer() is referring to your class rather than javax.swing.Timer, and you don't declare a start method. I'm pretty sure you want to use the javax.swing.Timer... more 10/2/2013 9:40:27 AM
What you've shown isn't a byte array - it's text, which looks very much like base64 data. You should try decoding it from base64 to "raw" bytes first: byte[] imageData = Base64.decode(rowItem.getImage(), Base64.DEFAULT); ... or fix... more 10/2/2013 9:35:47 AM
You need to cast o[0, 0] to object[,] first: var o = (object[,]) ob4[0]; double[,] p = (double[,]) o[0, 0]; It would be better if you could avoid having all these nested multi-dimensional arrays with so little type information at... more 10/2/2013 9:03:16 AM