修复驼峰变量的名称冲突(visual studio 警告)
fix name violation for camelcase variables (visual studio warning)
正如我在 asp.net Here
中读到的命名对流
Use Camel Case for variables and method parameters
所以我应该为 变量 和 方法参数 使用驼峰式命名,但我不知道为什么 visual studio 警告我对这些名字的看法:
public class Ad
{
public DateTime? startTimeLimitation { get; set; }
public DateTime? endTimeLimitaion { get; set; }
public Payment payment { get; set; }
}
作为 修复名称违规
那么我应该忽略这个警告还是我错过了一些关于命名对流的东西?
局部变量使用驼峰式大小写,class 级变量使用帕斯卡式大小写,例如
public class MyClass
{
public DateTime? StartTimeLimitation { get; set; }
void MyMethod()
{
int localVariable = 0;
//some other code
}
}
正如我在 asp.net Here
中读到的命名对流Use Camel Case for variables and method parameters
所以我应该为 变量 和 方法参数 使用驼峰式命名,但我不知道为什么 visual studio 警告我对这些名字的看法:
public class Ad
{
public DateTime? startTimeLimitation { get; set; }
public DateTime? endTimeLimitaion { get; set; }
public Payment payment { get; set; }
}
作为 修复名称违规
那么我应该忽略这个警告还是我错过了一些关于命名对流的东西?
局部变量使用驼峰式大小写,class 级变量使用帕斯卡式大小写,例如
public class MyClass
{
public DateTime? StartTimeLimitation { get; set; }
void MyMethod()
{
int localVariable = 0;
//some other code
}
}