TypeName | MakeLocalVariableConstWhenItIsPossibleAnalyzer |
Check Id | CC0030 |
Category | Performance |
Severity | Info |
This variable is assigned a constant value and never changed, it can be made a const
class Class1
{
int Foo()
{
int a = 10;
return a;
}
}
A code fix will be presented to you that will transform the code:
class Class1
{
int Foo()
{
const int a = 10;
return a;
}
}
None
TBD