in oCn? What is the rule?
using(SqlConnection oCn = new SqlConnection(
"Server=(local);Database=Pubs;User ID=TestUser1;Password=foo1;")) {
oCn.Open();
...
}
I found that type of naming in this article http://msdn.microsoft.com/en-us/magazine/cc163799.aspx
The idea of variable prefixes They are used to tell the developer what kind of variable he is using. The first prefix for example is m_ and the conclusion is this variable is a member. When I learned programming we had to give the developer more information in case of a member.
As stated in the other answers, m_ prefix is used to indicate that a variable is a class member. This is different from Hungarian notation because it doesn't indicate the type of the variable but its context.
Many programmers use it to differentiate private variables - so instance variables will typically have an underscore prepended to the name. This prevents confusion with local variables.
A variable name cannot start with a digit. A variable name can only contain alpha-numeric characters and underscores ( a-z, A-Z , 0-9 , and _ ) Variable names are case-sensitive (age, Age and AGE are three different variables) There is no limit on the length of the variable name.
An entirely obsolete way of saying that "Cn" is an *o*bject.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With