Cause:
Static members are part of a type and non-static members are part of an instance of that type. If you want to have a shared state or a function between different instances of the same type, a static member will be helpful. This code issue informs you about an instance member that can be converted into a static member.
Read more…
Cause:
Highlights identifier references to local variables, fields, method, properties, classes, structures, interfaces and everything that is not yet declared.
Read more…
Cause:
In the String.Format call you can specify any number of arguments and the corresponding format items, where those argument values will be inlined. When the corresponding argument in the call is absent, the FormatException will be thrown (Index (zero based) must be greater than or equal to zero and less than the size of the argument list). The compiler does not validate the format items, so this may lead to errors in your application. This code issue allows you to avoid such errors by highlighting format items with an incorrect index.
Read more…
Cause:
Returns are forbidden in finally clauses by the compiler. A compiler error will occur in case of a return statement inside a finally block, and refuse to let you write such potentially ambiguous and confusing code. The purpose of a finally statement is to ensure that the necessary cleanup of objects happens immediately and always. In other words, it is designed for releasing all locks and resources and cannot leave the block until finishing the cleanup task.
Read more…
Here are several of the code issues, which highlight redundant and unnecessary code blocks that may be safely removed for improving code readability.
Here are a few simple code issues of a hint type (suggestion) for declarations and initializations.
Here are the code issues for different expressions. If the fix is applied, following a hint it may optimize the code and/or improve its readability.
Here are the suggestions (hints) code issues which might improve the readability, clarity and performance of your source code.