Browsing 7239 questions and answers with Jon Skeet
I suspect your default culture info uses comma as a decimal separator instead of dot. If you know your input will have a dot, it's best to specify the invariant culture explicitly: double d1 = double.Parse(s1,... more 8/16/2014 8:17:49 AM
You're trying to assign a CustomerValidator reference to a variable of type T. What if T is StringBuilder or something like that? Fundamentally, it seems odd for your ValidationHelper to claim to be generic, but then be specific to... more 8/16/2014 7:20:58 AM
Finding the element name differences is easy: var clientElementNames = client.Elements().Select(x => x.Name); var serverElementNames = server.Elements().Select(x => x.Name); var clientOnly =... more 8/15/2014 8:22:12 PM
I strongly suspect that this line is the problem: var loggedinuser = RavenSession.Load<ContentPage>("NotifyUser/" + user) as NotifyUser; loggedinuser will be null if the Load method actually returns something other than a... more 8/15/2014 4:34:44 PM
I would have originally thought that when you called super.doSomething() then it would have acquired a lock on the base class object and not the derived class object. There's only one object - if you create an instance of... more 8/15/2014 1:16:31 PM
Nullable types was introduced in .NET 3.X No, they were introduced in .NET 2.0. See the documentation. How do i created a property of type datetime and make it accept null so i can send null values to my DB table column? You... more 8/15/2014 1:04:15 PM
Why don't I get a compilation error in the code below? Because the compiler only cares about the static type of the expression you're trying to cast. Look at these two lines: BlackInk blackInk = new BlackInk(); printable =... more 8/15/2014 12:44:56 PM
You're confusing the compile-time type of a variable with the execution-time type of its value. The A.equals method will be called rather than Object.equals because of overriding - the execution-time type is used to determine which... more 8/15/2014 8:46:40 AM
There are various approaches you could take here: Sort the array using Arrays.sort, then work from the end until you saw a different value... letting you work out the value and the count, which you could then multiply together. This is... more 8/15/2014 6:14:39 AM
Three problems: Your two pattern straings are identical - why try them both? hh means hour of 12-hour clock; 16 isn't a valid value You should escape the CDT part as you want it as a literal I suspect you want: "ddd MMM d HH:mm:ss... more 8/14/2014 8:58:53 PM