Browsing 7239 questions and answers with Jon Skeet
This is the difference between an assignment context (JLS 5.2) and an invocation context (JLS 5.3) for conversions. Assignment context conversions include: In addition, if the expression is a constant expression (ยง15.28) of type byte,... more 2/9/2015 8:14:45 AM
Well, in your projection you have: c => new {FullName = (c.FirstName + ' ' + c.LastName), c.EID} That's creating an instance of an anonymous typoe - not an instance of HRM_PersonalInformations. If those are the only two properties... more 2/9/2015 6:47:09 AM
Look at the format you're passing: "yyyy-MM-dd'T'HH:mm:ss'Z'" That has no milliseconds, whereas your sample is "2015-02-08T06:00:00.000Z" which does have milliseconds. It looks like you want: "yyyy-MM-dd'T'HH:mm:ss.fff'Z'" Also, I'd... more 2/8/2015 9:25:17 PM
I was curious as to how a foreach loop in C# iterates over a multidimensional array. As always for questions like this, the ultimate authority is the C# language specification. In this case, section 8.8.4: The order in which... more 2/7/2015 6:32:16 PM
I would suggest you read in a line of text, with a specific format, then use DateFormat to parse it. For example: DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm", ... more 2/7/2015 5:27:16 PM
You need to separate the binary to run from the arguments. I would recommend using ProcessStartInfo to make this clearer: var info = new ProcessStartInfo { FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", ... more 2/7/2015 4:58:41 PM
Is there a way to make an array in java, without defining or asking for it's length first ? A.k.a the user enters some numbers as arguments, and the program creates an array with that many arguments. It's unclear exactly what... more 2/7/2015 12:14:40 PM
If the DailyDate property is already just a date, instead of a date and time, then it would be simplest to just use: // Outside the query so it becomes a constant, effectively var today = DateTime.Today; var employees =... more 2/7/2015 10:57:11 AM
You just need to use the [JsonProperty] attribute to specify the JSON name. Here's an example (ignoring ListOfStuff for simplicity - apply the same approach): using System; using Newtonsoft.Json; public class MyObject { ... more 2/7/2015 10:46:10 AM
No, DateTime doesn't retain calendar information... it's effectively always in the Gregorian calendar. If you construct a DateTime with a different calendar system, it converts it to the Gregorian calendar, and you need to use the Calendar... more 2/7/2015 10:38:00 AM