A simple question
Consider this piece of code in C#
String a;
String b;
String c;
1. a =
2. b =
3. //Comment
4. c = "a String";
During compilation, it was fine, but i hit an error when I run my application. From my logs, the error occur at the above.
Question:
Is the error caused by the comment in line 3?
The error is "Object reference not set to an instance of an object"
I'm guessing the compiler treats the above code as 1 statement.
This code resides in the code behind of an aspx page. (aspx.cs)
//Backstory//
The aspx was tested in the test servers and was file. However after we deployed the page to the production server, there is an error at pageload(), the line where the error occur is at line 1 of my code example above.
It is just my suspicion that the error is caused by the comment.
Am I right?