Case sensitiviy in this case is referring to commands and variable names. For example, are "printf" and "PrintF" equivalent? Are fullname and FullName equivalent? When you create commands, operations, methods, or variables should you worry about case?
C# Case Sensitivity
In C# commands and variable names are case sensitive. The following does NOT:
messagebox.Show("hello"); //Does not compile!
The first time you type any other case for commands or variables, VS.Net will change it to the accepted or defined case. For example, if you type messagebox.show it is converted to MessageBox.Show. Once corrected, you can break it again by editing MessageBox to messagebox and the compiler will give you an error.
Syntax Example:
The following code works:
MessageBox.Show("hello");
Wrong Cased Variables Give Compiler Error
If you declare a variable with one case and attempt to use it with another case, you'll get a compiler error.
The following are practice certification questions with answers highlighted. These questions were prepared by Mike Prestwood and are intended to stress an important aspect of this KB post. All our practice questions are intended to prepare you generally for passing any certification test as well as prepare you for professional work.