Browsing 7239 questions and answers with Jon Skeet
object and string are reference types, so they're already nullable. For example, this is already valid: string x = null; The Nullable<T> generic type is only for cases where T is a non-nullable value type. In the declaration for... more 1/20/2014 11:35:26 AM
Yes, that's absolutely fine. Even for public classes, this is a compiler-specific optional restriction. From section 7.6 of the JLS: If and only if packages are stored in a file system (ยง7.2), the host system may choose to enforce the... more 1/20/2014 10:44:35 AM
As of C# 5, this is really easy using caller info attributes: private void Method1() { //Do something Log("Something"); } private void Method2() { //Do something Log("Something"); } private void Log(string message,... more 1/20/2014 9:42:57 AM
This code: OracleConnection m_cnn = new OracleConnection("..."); ... declares a local variable inside the constructor. It's not assigning a value to the instance variable. To do that, you should use: m_cnn = new... more 1/20/2014 9:36:40 AM
Because i dont want to change my Date without using setDate. Then you shouldn't return a reference to a mutable object in your get method. For example: private Date d; Date getDate() { // Return a reference to an independent copy... more 1/20/2014 8:45:21 AM
Well you haven't shown where vertexes is initialized (or even declared) in Graph. I suspect it's empty, so when you execute this code: public int[][] getAdjacent() { int n = vertexes.size(); adjacent = new int[n][]; ... ... more 1/20/2014 7:05:41 AM
From the documentation of SymmetricAlgorithm.IV: The size of the IV property must be the same as the BlockSize property divided by 8. I suspect you'll find that rijn.BlockSize is 128, so you should provide a 32-byte IV. (It's not... more 1/20/2014 6:52:21 AM
As I suspect, the problem is that you're putting your values directly into the SQL - without even trying to escape them. Don't do that. As well as the problems you're seeing, you've opened yourself up to a SQL injection attack. Use... more 1/19/2014 4:30:19 PM
Presumably you're splitting on "|" in the second case - and | has a special meaning within regular expressions. If you want to split on the actual pipe character, you should escape it: String[] bits = whole.split(Pattern.quote("|")); more 1/19/2014 9:49:10 AM
I'm not a Javascript expert by any means, but you seem to be ignoring the result of parseInt, instead storing just the result of prompt() in your a, b and t variables. I'd expect this: parseInt(a = prompt('Pay 1'), 10); to be: a =... more 1/19/2014 9:37:21 AM