22 lines
238 B
Plaintext
22 lines
238 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
int GetBestNumber()
|
|
{
|
|
return 12; // Noncompliant
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
const int BestNumber = 12;
|
|
----
|
|
or
|
|
|
|
----
|
|
static readonly int BestNumber = 12;
|
|
----
|