prodot / ReCommended-Extension

Code analysis improvements and context actions
Apache License 2.0
59 stars 11 forks source link

New analyzer for array initialization expressions #31

Closed michael-damatov closed 6 years ago

michael-damatov commented 6 years ago

Empty array initialization

Suggest to use Array.Empty<T>() method to reuse the immutable instance.

Applies to:

Note: the analyzer is only active if the used framework has the Array.Empty<T>() method.

Initialization of arrays with default values

Suggest to use T[n] to improve code readability, where n is the item count.

Applies to:

Current Limitations