- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
ID: csharp-code-style/variable-naming-conventions
Language: C#
Severity: Notice
Category: Code Style
Variable names should follow the camelCase
pattern and start with a lowercase letter, except for private and protected fields that should start with _
.
class My_Class {
int MyVariable = 10;
public void foo() {
int FooBar = 14;
int BAZ_QUUX = 3;
DateTimeOffset t1 = TimeZoneInfo.ConvertTime();
}
}
public class CertificateHelperTests {
private const string PemCertPublic = "";
}
class My_Class {
int _myVariable = 10;
[TestMethod]
public void BooleanToIntegerConverterTest()
{
var converter = new BooleanToIntegerConverter
{
ValueOnTrue = 1,
ValueOnFalse = 2
};
Assert.AreEqual(1, converter.Convert(true, typeof(int), null, null));
Assert.AreEqual(2, converter.Convert(false, typeof(int), null, null));
}
}
class My_Class {
int myVariable = 10;
}
|
|
For more information, please read the Code Analysis documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products