Browsing 7239 questions and answers with Jon Skeet
You shouldn't need to do any of this yourself - just ask TimeZoneInfo to do the conversion. That's what it's there for! // Only need to do this once... private static readonly TimeZoneInfo londonZone = ... more 4/5/2017 9:34:40 PM
This is the problem: sum += result; That's not atomic. It's effectively: var tmp = sum; tmp += result; sum = tmp; What do you think will happen if both of your threads reach the middle line at the same time? You can fix this with... more 4/4/2017 7:13:03 PM
Parameters in prepared statements are for values - you're trying to use them to select fields. They just don't work that way. In this very specific instance, you'll need to make the SQL dynamic. However, you'll want to make sure that... more 4/4/2017 3:11:45 PM
It looks like you probably shouldn't have a Repositories class - instead, change your ConfigEntry.Repositories property to: public Dictionary<string, Git> Repositories { get; set; } Then you'll get a dictionary where the key of... more 4/3/2017 9:38:55 AM
Basically, requestBody.Values will be null until you populate it. Just create your own list and populate it with your array, e.g. var test = new string[] { "p1", "p2", "p3", "", "", "", "", "foo" }; requestBody.Values = new... more 4/1/2017 12:37:39 PM
Ah, the joys of operator precedence. That line is effectively: System.out.println(("a instanceof String:" + a) instanceof String); ... so you're doing string concatenation, and then checking whether the result is a string. So it will... more 4/1/2017 11:42:30 AM
How do I prevent the reference to the main array from breaking when the need arises for me to resize it? You don't. You just don't use an array. Array objects aren't resizable, and after you've copied the value of contentToShow into... more 3/31/2017 10:14:51 AM
But since I don't know how to check it, can you please let me know if a backup field always get created (even if we have a simple property with only get; and set; ? An automatically implemented property, e.g. public int... more 3/30/2017 8:15:30 AM
The plan is that this will work with netstandard2.0 tooling, I believe - but it doesn't work at the moment due to some oddities around net46x. There are two docs for the mappings between netstandard and .NET framework... more 3/30/2017 6:17:29 AM
This is the start of the problem: ResponseError = request.RequestError; You have a single Error object - after that line, your response and request both refer to the same object. Bear in mind that Error is a class, so the values of... more 3/28/2017 3:56:34 PM