Browsing 7239 questions and answers with Jon Skeet
Yes, this is the documented behaviour of Badgerfish: Text content of elements goes in the $ property of an object. From the documentation, there's no obvious way of transforming to object properties that don't have an @. (If you're... more 2/24/2018 10:43:52 AM
Why? For exactly the reason stated in the error message: you're trying to use IEnumerable<Customers> as the type argument for E, but E has this constraint: where E : System.Linq.IQueryable<T> And how can it be... more 2/22/2018 10:33:38 AM
Task.WhenAll doesn't block anyway, unlike Task.WaitAll. It just return a task that completes when all of the original tasks have completed. It's important to understand that you don't await a method - you await a value (or some type that... more 2/21/2018 10:37:35 AM
Rather than building up a string, I'd suggest building up the XML directly: var body = new XElement("body"); using (SqlConnection conn = new SqlConnection(conString)) { string query = string.Format("{0}{1}'", "SELECT [VALUE1],[VALUE2]... more 2/21/2018 9:30:48 AM
I'd use LINQ for this, in combination with DateTime.AddMinutes. LINQ makes it very easy to generate a sequence, and then convert that sequence into an array: // Important: only call DateTime.Now once, so that all the values are //... more 2/20/2018 7:48:14 PM
The main problem is that the "ar" culture has a different default calendar system - it's trying to parse that as a date in the Um Al Qura calendar. If you print ci.DateTimeFormat.Calendar it will show System.Globalization.UmAlQuraCalendar,... more 2/20/2018 11:51:58 AM
You can use the null-conditional operator to make all of this a lot simpler, assuming that the element type of totals is a reference type: TotalCashIn = totals?.FirstOrDefault()?.TotalCashIn; With this: If totals is null, the overall... more 2/20/2018 7:55:09 AM
One option would be to have an array of extraction functions that you could apply to points. You can then use the LINQ Select overload that accepts a Func<TInput, int, TOutput> to generate a sequence of the values you want to add,... more 2/18/2018 3:57:08 PM
Guid.NewGuid is a method, and you're not calling that method from your VB code - you're calling the constructor accepting a string. You can call that same constructor in C#: // Using an array initializer for simplicity Guid[] test = { new... more 2/13/2018 11:45:11 AM
Google.Protobuf targets .NET 4.5 and netstandard1.0. It's important to understand that when multiple frameworks are listed in terms of dependencies, that just means that the package uses multi-targeting to support multiple... more 2/9/2018 7:08:52 PM