Browsing 7239 questions and answers with Jon Skeet
The endianness of BinaryReader only affects methods such as ReadInt32. It doesn't affect ReadBytes - that will always return you the bytes in the order in which they occur within the stream. If you need a byte array (or a hex... more 9/26/2014 2:01:30 PM
Your select clause: select new { ... } is selecting an anonymous type. You need it to select a DssClient_Sasid_Certified, so that you can return the type that your method declaration says you're going to return. You may just need... more 9/26/2014 12:43:07 PM
I suspect you have set the "treat warnings as errors" flag in your project build properties. You can either remove that flag, or set it to only treat specific warnings as errors. more 9/26/2014 12:40:09 PM
All you need is to work out the start and end dates, then use comparisons in your where clause: var earliest = depDate.AddDays(-3); var latest = depDate.AddDays(4); // Exclusive var destinationFlights = ... where ... &&... more 9/26/2014 10:23:54 AM
The Where method doesn't execute your query - it just builds a query, which is then executed when the data is requested. This is known as deferred execution. So in your first snippet, the filter is only applied when Count() is called -... more 9/26/2014 10:01:27 AM
You're calling Replace on a string, but then not doing anything with the result. Strings are immutable in C# - any methods which sound like they might be changing the string actually just return a reference to a new string (or potentially... more 9/26/2014 5:30:26 AM
From the Round documentation (looking at Round(double, int): Rounds a double-precision floating-point value to a specified number of fractional digits, and rounds midpoint values to the nearest even number (example). Your value is... more 9/25/2014 9:40:42 PM
Currently you're just importing StringEscapeUtils in a regular way, but then you're not explicitly calling the method from the right class. I suspect you either want: import static groovy.json.StringEscapeUtils.escapeJava; textFinal:... more 9/25/2014 7:04:53 PM
You should split your task into two parts: Finding the menu with a particular ID Getting its children The latter is simple - you just use the menuItem property, which would be better named Children or something similar. I'd tackle the... more 9/25/2014 6:53:12 PM
Yes, there's a massive difference. In example 1, intro1 and intro2 refer to different objects. In examples 2 and 3, intro1 and intro2 have the same value - they refer to the same object, so if you call Object.ReferenceEquals(intro1,... more 9/25/2014 6:14:53 PM