UninitializedLocalVariable

UninitializedLocalVariable

Summary

Initialize local variables when they are declared.

Default severity

Warning

Description

You should assign an initial value to the local variable always when it is declared.

Code fix

The code fix is not provided.

Example

Diagnostic

int foo;
string bar;