The integrated platform for monitoring & security
Observability
End-to-end, simplified visibility into your stack’s health & performance
Infrastructure
Applications
Logs
Security
Detect, prioritize, and respond to threats in real-time
Cloud Security
Application Security
Cloud SIEM
Digital Experience
Optimize front-end performance and enhance user experiences
Related Products
Software Delivery
Build, test, secure and ship quality code faster
Service Management
Integrated, streamlined workflows for faster time-to-resolution
AIOps
AI
Monitor and improve model performance. Pinpoint root causes and detect anomalies.
AI Observability
Platform Capabilities
Built-in features & integrations that power the Datadog platform
Built-in Features
Workflows & Collaboration
Extensibility
Industry
Technology
Use-case
Looking for Datadog logos?
You can find the logo assets on our press page.
ID: csharp-best-practices/avoid-non-existing-operators
csharp-best-practices/avoid-non-existing-operators
Language: C#
Severity: Warning
Category: Error Prone
Operator += and -= do not exist and will lead to inconsistent or undefined behavior.
+=
-=
class MyClass { public void myMethod() { int myInt1 = 1; int myInt2 = 1; myInt2 =+ myInt1; myInt2 =- myInt1; } }
class MyClass { public void myMethod() { int myInt1 = 1; int myInt2 = 1; myInt2 += myInt1; myInt2 -= myInt1; } }
Seamless integrations. Try Datadog Code Analysis
1 2
rulesets: - csharp-best-practices # Rules to enforce C# best practices.
For more information, please read the Code Analysis documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products