Browsing 7239 questions and answers with Jon Skeet
No, ISO-8601 explicitly specifies that calendar weeks start on Monday - and "week of week year" is basically following ISO-8601. If you want a different week and day numbering scheme, you'll currently have to create your own. (It may well... more 6/24/2014 10:43:21 AM
The problem is that this is an enum without a list of members. You'd normally have: public enum Foo { VALUE1, VALUE2; } You can have an enum with no members, but you still need the semi-colon: public enum Foo { ; } That's now... more 6/24/2014 9:51:17 AM
Have you considered using Parallel LINQ instead? return users.AsParallel().AsOrdered() .SelectMany(user => mailLibrary.getAllMails(user)) .ToArray(); I believe that will do the right thing, in terms of... more 6/24/2014 9:39:09 AM
Presumably the number means something - so I'd create a method which uses that information. For example: public enum HttpStatus { OK(200), ... NOT_FOUND(404); private int statusCode; private HttpStatus(int... more 6/24/2014 8:32:46 AM
The problem is that "Carlos Magno" starts with a Unicode byte-order mark. If you copy and paste your sample text ([Analise ... Carlos Magno]) into the Unicode Explorer you'll see that just before the "C" of Carlos Magno, you've got... more 6/23/2014 6:59:47 PM
So I suppose C# does not overload return types? No, indeed it doesn't. The return type isn't part of the signature. From section 3.6 of the C# 5 specification (emphasis mine): The signature of a method consists of the name of the... more 6/23/2014 6:46:15 PM
The 128*8 is the requested key length, as per the documentation. keyLength - the to-be-derived key length. It's not clear that it's in bits, but it is. So you're asking for a key which is 1024 bits long (because 128 * 8 =... more 6/23/2014 2:52:51 PM
You don't need to have a result variable at all. You need to make sure that every possible way that execution can reach the end of your function (without just throwing an exception) means you get to a return statement, and every return... more 6/23/2014 2:27:54 PM
Forget the hash - your equality comparison is fundamentally broken to start with. Consider three values: foo: a=10, b=0 bar: a=10, b=5 baz: a=20, b=5 Now: foo.equals(bar) => true because of a bar.equals(baz) => true because of... more 6/23/2014 2:07:34 PM
How can I fix the issue? By specifying the table name as part of the SQL. Table and column names can't be parameterized in most database SQL dialects, including SQL Server. You should either perform very stringent validation on the... more 6/23/2014 1:58:22 PM