ReSharper 2020.1 Help

Code Inspections in VB.NET

In VB.NET, ReSharper 2020.1 provides two kinds of code inspections: 261 inspections that detect errors such as broken syntax, unresolved symbols, compiler errors, and so on (you cannot configure or disable any of these inspections), and 255 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.

Configurable VB.NET inspections are listed below, grouped by their categories.

Code Notification (1 inspection)

This category groups code inspections with minor severity levels.
InspectionIDEditorConfig propertyDefault severity
Inactive preprocessor branchInactivePreprocessorBranchresharper_inactive_preprocessor_branch_highlightingWarning

Common Practices and Code Improvements (110 inspections)

This category groups inspections that hunt for medium severity issues that mainly affect code readability.
InspectionIDEditorConfig propertyDefault severity
Annotation duplicate in hierarchyAnnotationRedundancyInHierarchyresharper_annotation_redundancy_in_hierarchy_highlightingWarning
Auto-property can be made get-only (non-private accessibility)AutoPropertyCanBeMadeGetOnly.Globalresharper_auto_property_can_be_made_get_only_global_highlightingSuggestion
Auto-property can be made get-only (private accessibility)AutoPropertyCanBeMadeGetOnly.Localresharper_auto_property_can_be_made_get_only_local_highlightingSuggestion
Check for reference equality insteadVBCheckForReferenceEqualityInstead.1resharper_vb_check_for_reference_equality_instead_1_highlightingSuggestion
Check for reference equality insteadVBCheckForReferenceEqualityInstead.2resharper_vb_check_for_reference_equality_instead_2_highlightingSuggestion
Class can be made sealed (non-inheritable) (non-private accessibility)ClassCanBeSealed.Globalresharper_class_can_be_sealed_global_highlightingDisabled
Class can be made sealed (non-inheritable) (private accessibility)ClassCanBeSealed.Localresharper_class_can_be_sealed_local_highlightingDisabled
Container nullability attribute usage with declaration of non-container typeContainerAnnotationRedundancyresharper_container_annotation_redundancy_highlightingWarning
Convert local variable or field to constant (non-private accessibility)ConvertToConstant.Globalresharper_convert_to_constant_global_highlightingHint
Convert local variable or field to constant (private accessibility)ConvertToConstant.Localresharper_convert_to_constant_local_highlightingHint
Convert property to auto-propertyConvertToVbAutoPropertyresharper_convert_to_vb_auto_property_highlightingSuggestion
Convert property to auto-property when possibleConvertToVbAutoPropertyWhenPossibleresharper_convert_to_vb_auto_property_when_possible_highlightingHint
Convert property to auto-property with private setterConvertToVbAutoPropertyWithPrivateSetterresharper_convert_to_vb_auto_property_with_private_setter_highlightingHint
Field can be made readonly (non-private accessibility)FieldCanBeMadeReadOnly.Globalresharper_field_can_be_made_read_only_global_highlightingSuggestion
Field can be made readonly (private accessibility)FieldCanBeMadeReadOnly.Localresharper_field_can_be_made_read_only_local_highlightingSuggestion
Get-only auto-property is never assignedUnassignedGetOnlyAutoPropertyresharper_unassigned_get_only_auto_property_highlightingWarning
Local function can be made staticLocalFunctionCanBeMadeStaticresharper_local_function_can_be_made_static_highlightingHint
Member can be made private (non-private accessibility)MemberCanBePrivate.Globalresharper_member_can_be_private_global_highlightingSuggestion
Member can be made private (private accessibility)MemberCanBePrivate.Localresharper_member_can_be_private_local_highlightingSuggestion
Member can be made protected (non-private accessibility)MemberCanBeProtected.Globalresharper_member_can_be_protected_global_highlightingSuggestion
Member can be made protected (private accessibility)MemberCanBeProtected.Localresharper_member_can_be_protected_local_highlightingSuggestion
Member can be made static(shared) (non-private accessibility)MemberCanBeMadeStatic.Globalresharper_member_can_be_made_static_global_highlightingHint
Member can be made static(shared) (private accessibility)MemberCanBeMadeStatic.Localresharper_member_can_be_made_static_local_highlightingHint
Member or type can be made internal(friend)MemberCanBeInternalresharper_member_can_be_internal_highlightingDisabled
Multiple nullable attributes usageMultipleNullableAttributesUsageresharper_multiple_nullable_attributes_usage_highlightingWarning
Nullability attribute usage with declaration of void or value typeAnnotationRedundancyAtValueTyperesharper_annotation_redundancy_at_value_type_highlightingWarning
Parameter can be declared with base typeSuggestBaseTypeForParameterresharper_suggest_base_type_for_parameter_highlightingHint
Parameter type can be IEnumerable<T> (non-private accessibility)ParameterTypeCanBeEnumerable.Globalresharper_parameter_type_can_be_enumerable_global_highlightingHint
Parameter type can be IEnumerable<T> (private accessibility)ParameterTypeCanBeEnumerable.Localresharper_parameter_type_can_be_enumerable_local_highlightingHint
Possible mistaken argumentVBPossibleMistakenArgumentresharper_vb_possible_mistaken_argument_highlightingWarning
Possible mistaken call to GetType()VBPossibleMistakenCallToGetType.2resharper_vb_possible_mistaken_call_to_get_type_2_highlightingWarning
Possible mistaken call to GetType()VBPossibleMistakenCallToGetType.1resharper_vb_possible_mistaken_call_to_get_type_1_highlightingWarning
Remove ToList()VBRemoveToList.1resharper_vb_remove_to_list_1_highlightingSuggestion
Remove ToList()VBRemoveToList.2resharper_vb_remove_to_list_2_highlightingSuggestion
Replace with FirstOrDefault($args$)VBReplaceWithFirstOrDefaultresharper_vb_replace_with_first_or_default_highlightingSuggestion
Replace with LastOrDefault($args$)VBReplaceWithLastOrDefaultresharper_vb_replace_with_last_or_default_highlightingSuggestion
Replace with OfType<T>() (replace with OfType(Of ..)())VBReplaceWithOfType.2resharper_vb_replace_with_of_type_2_highlightingSuggestion
Replace with OfType<T>() (replace with OfType(Of ..)())VBReplaceWithOfType.1resharper_vb_replace_with_of_type_1_highlightingSuggestion
Replace with OfType<T>().Any() (replace with OfType(Of ..)().Any())VBReplaceWithOfType.Any.1resharper_vb_replace_with_of_type_any_1_highlightingSuggestion
Replace with OfType<T>().Any() (replace with OfType(Of ..)().Any(..))VBReplaceWithOfType.Any.2resharper_vb_replace_with_of_type_any_2_highlightingSuggestion
Replace with OfType<T>().Count() (replace with OfType(Of ..)().Count())VBReplaceWithOfType.Count.1resharper_vb_replace_with_of_type_count_1_highlightingSuggestion
Replace with OfType<T>().Count() (replace with OfType(Of ..)().Count(..))VBReplaceWithOfType.Count.2resharper_vb_replace_with_of_type_count_2_highlightingSuggestion
Replace with OfType<T>().First() (replace with OfType(Of ..)().First())VBReplaceWithOfType.First.1resharper_vb_replace_with_of_type_first_1_highlightingSuggestion
Replace with OfType<T>().First() (replace with OfType(Of ..)().First(..))VBReplaceWithOfType.First.2resharper_vb_replace_with_of_type_first_2_highlightingSuggestion
Replace with OfType<T>().FirstOrDefault() (replace with OfType(Of ..)().FirstOrDefault())VBReplaceWithOfType.FirstOrDefault.1resharper_vb_replace_with_of_type_first_or_default_1_highlightingSuggestion
Replace with OfType<T>().FirstOrDefault() (replace with OfType(Of ..)().FirstOrDefault(..))VBReplaceWithOfType.FirstOrDefault.2resharper_vb_replace_with_of_type_first_or_default_2_highlightingSuggestion
Replace with OfType<T>().Last() (replace with OfType(Of ..)().Last())VBReplaceWithOfType.Last.1resharper_vb_replace_with_of_type_last_1_highlightingSuggestion
Replace with OfType<T>().Last() (replace with OfType(Of ..)().Last(..))VBReplaceWithOfType.Last.2resharper_vb_replace_with_of_type_last_2_highlightingSuggestion
Replace with OfType<T>().LastOrDefault() (replace with OfType(Of ..)().LastOrDefault())VBReplaceWithOfType.LastOrDefault.1resharper_vb_replace_with_of_type_last_or_default_1_highlightingSuggestion
Replace with OfType<T>().LastOrDefault() (replace with OfType(Of ..)().LastOrDefault(..))VBReplaceWithOfType.LastOrDefault.2resharper_vb_replace_with_of_type_last_or_default_2_highlightingSuggestion
Replace with OfType<T>().Single() (replace with OfType(Of ..)().Single())VBReplaceWithOfType.Single.1resharper_vb_replace_with_of_type_single_1_highlightingSuggestion
Replace with OfType<T>().Single() (replace with OfType(Of ..)().Single(..))VBReplaceWithOfType.Single.2resharper_vb_replace_with_of_type_single_2_highlightingSuggestion
Replace with OfType<T>().SingleOrDefault() (replace with OfType(Of ..)().SingleOrDefault())VBReplaceWithOfType.SingleOrDefault.1resharper_vb_replace_with_of_type_single_or_default_1_highlightingSuggestion
Replace with OfType<T>().SingleOrDefault() (replace with OfType(Of ..)().SingleOrDefault(..))VBReplaceWithOfType.SingleOrDefault.2resharper_vb_replace_with_of_type_single_or_default_2_highlightingSuggestion
Replace with OfType<T>().Where() (replace with OfType(Of ..)().Where(..))VBReplaceWithOfType.Whereresharper_vb_replace_with_of_type_where_highlightingSuggestion
Replace with single assignmentVBReplaceWithSingleAssignment.2resharper_vb_replace_with_single_assignment_2_highlightingSuggestion
Replace with single assignmentVBReplaceWithSingleAssignment.1resharper_vb_replace_with_single_assignment_1_highlightingSuggestion
Replace with single call to Any(..)VBReplaceWithSingleCallToAnyresharper_vb_replace_with_single_call_to_any_highlightingSuggestion
Replace with single call to Count(..)VBReplaceWithSingleCallToCountresharper_vb_replace_with_single_call_to_count_highlightingSuggestion
Replace with single call to First(..)VBReplaceWithSingleCallToFirstresharper_vb_replace_with_single_call_to_first_highlightingSuggestion
Replace with single call to FirstOrDefault(..)VBReplaceWithSingleCallToFirstOrDefaultresharper_vb_replace_with_single_call_to_first_or_default_highlightingSuggestion
Replace with single call to Last(..)VBReplaceWithSingleCallToLastresharper_vb_replace_with_single_call_to_last_highlightingSuggestion
Replace with single call to LastOrDefault(..)VBReplaceWithSingleCallToLastOrDefaultresharper_vb_replace_with_single_call_to_last_or_default_highlightingSuggestion
Replace with single call to Single(..)VBReplaceWithSingleCallToSingleresharper_vb_replace_with_single_call_to_single_highlightingSuggestion
Replace with single call to SingleOrDefault(..)VBReplaceWithSingleCallToSingleOrDefaultresharper_vb_replace_with_single_call_to_single_or_default_highlightingSuggestion
Replace with SingleOrDefault($args$)VBReplaceWithSingleOrDefaultresharper_vb_replace_with_single_or_default_highlightingSuggestion
Return type can be IEnumerable<T> (non-private accessibility)ReturnTypeCanBeEnumerable.Globalresharper_return_type_can_be_enumerable_global_highlightingHint
Return type can be IEnumerable<T> (private accessibility)ReturnTypeCanBeEnumerable.Localresharper_return_type_can_be_enumerable_local_highlightingHint
Simplify conditional operatorSimplifyConditionalOperatorresharper_simplify_conditional_operator_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.10resharper_vb_simplify_linq_expression_10_highlightingHint
Simplify expressionVBSimplifyLinqExpression.3resharper_vb_simplify_linq_expression_3_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.5resharper_vb_simplify_linq_expression_5_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.8resharper_vb_simplify_linq_expression_8_highlightingHint
Simplify expressionVBSimplifyLinqExpression.2resharper_vb_simplify_linq_expression_2_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.7resharper_vb_simplify_linq_expression_7_highlightingHint
Simplify expressionVBSimplifyLinqExpression.4resharper_vb_simplify_linq_expression_4_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.1resharper_vb_simplify_linq_expression_1_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.6resharper_vb_simplify_linq_expression_6_highlightingSuggestion
Simplify expressionVBSimplifyLinqExpression.9resharper_vb_simplify_linq_expression_9_highlightingHint
Simplify 'IIf'SimplifyIIfresharper_simplify_i_if_highlightingSuggestion
Specify string comparison explicitlySpecifyStringComparisonresharper_specify_string_comparison_highlightingHint
String.Compare is culture-specific (string.Compare(string, int, string, int) is culture-specific)VBStringCompareIsCultureSpecific.4resharper_vb_string_compare_is_culture_specific_4_highlightingWarning
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)VBStringCompareIsCultureSpecific.5resharper_vb_string_compare_is_culture_specific_5_highlightingWarning
String.Compare is culture-specific (string.Compare(string, int, string, int, bool) is culture-specific)VBStringCompareIsCultureSpecific.6resharper_vb_string_compare_is_culture_specific_6_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string) is culture-specific)VBStringCompareIsCultureSpecific.1resharper_vb_string_compare_is_culture_specific_1_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)VBStringCompareIsCultureSpecific.2resharper_vb_string_compare_is_culture_specific_2_highlightingWarning
String.Compare is culture-specific (string.Compare(string, string, bool) is culture-specific)VBStringCompareIsCultureSpecific.3resharper_vb_string_compare_is_culture_specific_3_highlightingWarning
String.CompareTo is culture-specificVBStringCompareToIsCultureSpecificresharper_vb_string_compare_to_is_culture_specific_highlightingWarning
String.EndsWith is culture-specific (string.EndsWith(string) is culture-specific)VBStringEndsWithIsCultureSpecificresharper_vb_string_ends_with_is_culture_specific_highlightingDisabled
String.IndexOf is culture-specific (string.IndexOf(string) is culture-specific)VBStringIndexOfIsCultureSpecific.1resharper_vb_string_index_of_is_culture_specific_1_highlightingWarning
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)VBStringIndexOfIsCultureSpecific.2resharper_vb_string_index_of_is_culture_specific_2_highlightingWarning
String.IndexOf is culture-specific (string.IndexOf(string, int) is culture-specific)VBStringIndexOfIsCultureSpecific.3resharper_vb_string_index_of_is_culture_specific_3_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string) is culture-specific)VBStringLastIndexOfIsCultureSpecific.1resharper_vb_string_last_index_of_is_culture_specific_1_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)VBStringLastIndexOfIsCultureSpecific.3resharper_vb_string_last_index_of_is_culture_specific_3_highlightingWarning
String.LastIndexOf is culture-specific (string.LastIndexOf(string, int) is culture-specific)VBStringLastIndexOfIsCultureSpecific.2resharper_vb_string_last_index_of_is_culture_specific_2_highlightingWarning
String.StartsWith is culture-specific (string.StartsWith(string) is culture-specific)VBStringStartsWithIsCultureSpecificresharper_vb_string_starts_with_is_culture_specific_highlightingDisabled
Struct can be made readonlyStructCanBeMadeReadOnlyresharper_struct_can_be_made_read_only_highlightingSuggestion
Struct member can be made readonlyStructMemberCanBeMadeReadOnlyresharper_struct_member_can_be_made_read_only_highlightingDisabled
try-catch and try-finally statements can be mergedTryStatementsCanBeMergedresharper_try_statements_can_be_merged_highlightingHint
Use array creation expressionVBUseArrayCreationExpression.2resharper_vb_use_array_creation_expression_2_highlightingSuggestion
Use array creation expressionVBUseArrayCreationExpression.1resharper_vb_use_array_creation_expression_1_highlightingSuggestion
Use First() insteadVBUseFirstInsteadresharper_vb_use_first_instead_highlightingWarning
Use method Any()VBUseMethodAny.1resharper_vb_use_method_any_1_highlightingSuggestion
Use method Any()VBUseMethodAny.2resharper_vb_use_method_any_2_highlightingSuggestion
Use method Any()VBUseMethodAny.3resharper_vb_use_method_any_3_highlightingSuggestion
Use method Any()VBUseMethodAny.4resharper_vb_use_method_any_4_highlightingSuggestion
Use method Any()VBUseMethodAny.5resharper_vb_use_method_any_5_highlightingSuggestion
Use method IsInstanceOfType(..)VBUseMethodIsInstanceOfTyperesharper_vb_use_method_is_instance_of_type_highlightingSuggestion
Use 'TypeOf .. Is ..' operatorVBUseTypeOfIsOperator.2resharper_vb_use_type_of_is_operator_2_highlightingSuggestion
Use 'TypeOf .. Is ..' operatorVBUseTypeOfIsOperator.1resharper_vb_use_type_of_is_operator_1_highlightingSuggestion

Compiler Warnings (22 inspections)

Inspections in this category detect compiler warnings before you compile.
InspectionIDEditorConfig propertyDefault severity
Access of shared member through an instanceVBWarnings::BC42025resharper_vb_warnings_bc42025_highlightingWarning
Async method lacks 'Await' operatorsVBWarnings::BC42356resharper_vb_warnings_bc42356_highlightingWarning
Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'Await' operator to the result of the call.VBWarnings::BC42358resharper_vb_warnings_bc42358_highlightingWarning
Field is never usedUnusedField.Compilerresharper_unused_field_compiler_highlightingWarning
Function doesn't return a reference type value on all code pathsVBWarnings::BC42105,BC42106,BC42107resharper_vb_warnings_bc42105_bc42106_bc42107_highlightingWarning
Function doesn't return a struct value on all code pathsVBWarnings::BC42353,BC42354,BC42355resharper_vb_warnings_bc42353_bc42354_bc42355_highlightingWarning
Member shadows an overriable memberVBWarnings::BC400005resharper_vb_warnings_bc400005_highlightingWarning
Namespace or type specified in the Imports 'name' doesn't contain any public member or cannot be foundVBWarnings::BC40056resharper_vb_warnings_bc40056_highlightingWarning
Namespace should be default namespace of this projectVBWarnings::WME006resharper_vb_warnings_wme006_highlightingWarning
Non-accessed fieldNotAccessedField.Compilerresharper_not_accessed_field_compiler_highlightingWarning
Non-accessed local variableNotAccessedVariable.Compilerresharper_not_accessed_variable_compiler_highlightingWarning
Redundant DirectCast to the equals value typeVBWarnings::BC42349resharper_vb_warnings_bc42349_highlightingWarning
Runtime errors are likely to occur when converting X to YVBWarnings::BC42322resharper_vb_warnings_bc42322_highlightingWarning
Runtime errors might occur when converting X to YVBWarnings::BC42016resharper_vb_warnings_bc42016_highlightingWarning
Syntax error in XML commentVBWarnings::BC42304resharper_vb_warnings_bc42304_highlightingWarning
Unassigned fieldUnassignedField.Compilerresharper_unassigned_field_compiler_highlightingWarning
Unassigned readonly fieldUnassignedReadonlyField.Compilerresharper_unassigned_readonly_field_compiler_highlightingWarning
Unused local variableUnusedVariable.Compilerresharper_unused_variable_compiler_highlightingWarning
Use obsolete memberVBWarnings::BC40000resharper_vb_warnings_bc40000_highlightingWarning
Use obsolete member (without message)VBWarnings::BC40008resharper_vb_warnings_bc40008_highlightingWarning
Variable is used before it has been assigned a valueVBWarnings::BC42104resharper_vb_warnings_bc42104_highlightingWarning
XML comment has a tag with a 'cref' attribute that could not be resolvedVBWarnings::BC42309resharper_vb_warnings_bc42309_highlightingWarning

Constraints Violations (2 inspections)

This category includes code inspections, mostly with the warning severity level, which detect violations related to symbol attributes, including ReSharper's code annotations, and other similar issues.
InspectionIDEditorConfig propertyDefault severity
Inconsistent NamingInconsistentNamingresharper_inconsistent_naming_highlightingWarning
Namespace does not correspond to file locationCheckNamespaceresharper_check_namespace_highlightingWarning

Language Usage Opportunities (6 inspections)

This category includes code inspections, mostly with the suggestion severity level, which notify you when more advanced language constructs can be used. These inspections detect syntax of outdated language versions and suggest using features from more modern language versions. For most of the supported languages, language version can be detected automatically or set manually.
InspectionIDEditorConfig propertyDefault severity
Convert static method invocation to extension method callInvokeAsExtensionMethodresharper_invoke_as_extension_method_highlightingSuggestion
Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBeConvertedToQueryUsingAnotherGetEnumeratorresharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlightingHint
Loop can be converted into LINQ-expressionLoopCanBeConvertedToQueryresharper_loop_can_be_converted_to_query_highlightingHint
Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be usedForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumeratorresharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlightingHint
Part of loop's body can be converted into LINQ-expressionLoopCanBePartlyConvertedToQueryresharper_loop_can_be_partly_converted_to_query_highlightingDisabled
Use string interpolation expressionUseStringInterpolationresharper_use_string_interpolation_highlightingSuggestion

Potential Code Quality Issues (61 inspections)

This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance.
InspectionIDEditorConfig propertyDefault severity
'?:' expression has identical true and false branchesConditionalTernaryEqualBranchresharper_conditional_ternary_equal_branch_highlightingWarning
[ThreadStatic] doesn't work with instance fieldsThreadStaticAtInstanceFieldresharper_thread_static_at_instance_field_highlightingWarning
Abstract or virtual (overridable) event is never invokedEventNeverInvoked.Globalresharper_event_never_invoked_global_highlightingSuggestion
Access to disposed captured variableAccessToDisposedClosureresharper_access_to_disposed_closure_highlightingWarning
Access to foreach variable in closureAccessToForEachVariableInClosureresharper_access_to_for_each_variable_in_closure_highlightingWarning
Access to modified captured variableAccessToModifiedClosureresharper_access_to_modified_closure_highlightingWarning
Annotation conflict in hierarchyAnnotationConflictInHierarchyresharper_annotation_conflict_in_hierarchy_highlightingWarning
Auto-property accessor is never used (non-private accessibility)UnusedAutoPropertyAccessor.Globalresharper_unused_auto_property_accessor_global_highlightingWarning
Auto-property accessor is never used (private accessibility)UnusedAutoPropertyAccessor.Localresharper_unused_auto_property_accessor_local_highlightingWarning
Call to base member with implicit default parametersBaseMethodCallWithDefaultParameterresharper_base_method_call_with_default_parameter_highlightingWarning
Call to 'base.Equals(...)' is reference equalityBaseObjectEqualsIsObjectEqualsresharper_base_object_equals_is_object_equals_highlightingWarning
Cannot resolve propertyPropertyNotResolvedresharper_property_not_resolved_highlightingError
Cannot resolve resourceResourceNotResolvedresharper_resource_not_resolved_highlightingError
Cannot resolve resource itemResourceItemNotResolvedresharper_resource_item_not_resolved_highlightingError
Cannot resolve symbol in text argumentNotResolvedInTextresharper_not_resolved_in_text_highlightingWarning
Class is never instantiated (non-private accessibility)ClassNeverInstantiated.Globalresharper_class_never_instantiated_global_highlightingSuggestion
Class is never instantiated (private accessibility)ClassNeverInstantiated.Localresharper_class_never_instantiated_local_highlightingSuggestion
Collection is never updated (non-private accessibility)CollectionNeverUpdated.Globalresharper_collection_never_updated_global_highlightingWarning
Collection is never updated (private accessibility)CollectionNeverUpdated.Localresharper_collection_never_updated_local_highlightingWarning
Collection's content is never queried (non-private accessibility)CollectionNeverQueried.Globalresharper_collection_never_queried_global_highlightingWarning
Collection's content is never queried (private accessibility)CollectionNeverQueried.Localresharper_collection_never_queried_local_highlightingWarning
Element is localizableLocalizableElementresharper_localizable_element_highlightingWarning
Equality comparison of floating point numbersCompareOfFloatsByEqualityOperatorresharper_compare_of_floats_by_equality_operator_highlightingWarning
Event is never subscribed to (non-private accessibility)EventNeverSubscribedTo.Globalresharper_event_never_subscribed_to_global_highlightingSuggestion
Event is never subscribed to (private accessibility)EventNeverSubscribedTo.Localresharper_event_never_subscribed_to_local_highlightingSuggestion
Event never invokedEventNeverInvokedresharper_event_never_invoked_highlightingWarning
Exception rethrow possibly intendedPossibleIntendedRethrowresharper_possible_intended_rethrow_highlightingWarning
Function never returnsFunctionNeverReturnsresharper_function_never_returns_highlightingWarning
'GC.SuppressFinalize' is invoked for type without destructorGCSuppressFinalizeForTypeWithoutDestructorresharper_gc_suppress_finalize_for_type_without_destructor_highlightingWarning
Iterator never returnsIteratorNeverReturnsresharper_iterator_never_returns_highlightingWarning
Local variable hides memberLocalVariableHidesMemberresharper_local_variable_hides_member_highlightingWarning
Non-accessed field (non-private accessibility)NotAccessedField.Globalresharper_not_accessed_field_global_highlightingSuggestion
Non-accessed field (private accessibility)NotAccessedField.Localresharper_not_accessed_field_local_highlightingWarning
Non-readonly type member referenced in 'GetHashCode()'NonReadonlyMemberInGetHashCoderesharper_non_readonly_member_in_get_hash_code_highlightingWarning
'Object.ReferenceEquals' is always false because it is called with value typeReferenceEqualsWithValueTyperesharper_reference_equals_with_value_type_highlightingWarning
Operator 'is'/'Type Of ... Is ...' can be usedOperatorIsCanBeUsedresharper_operator_is_can_be_used_highlightingWarning
'out' parameter is not assigned upon exitNotAssignedOutParameterresharper_not_assigned_out_parameter_highlightingWarning
Overridden GetHashCode calls base 'Object.GetHashCode()'BaseObjectGetHashCodeCallInGetHashCoderesharper_base_object_get_hash_code_call_in_get_hash_code_highlightingWarning
Parameter hides memberParameterHidesMemberresharper_parameter_hides_member_highlightingWarning
Possible incorrect implementation of Double-Check Locking pattern. Possible multiple write access to checked fieldPossibleMultipleWriteAccessInDoubleCheckLockingresharper_possible_multiple_write_access_in_double_check_locking_highlightingWarning
Possible incorrect implementation of Double-Check Locking pattern. Read access to checked fieldReadAccessInDoubleCheckLockingresharper_read_access_in_double_check_locking_highlightingWarning
Possible infinite inheritancePossibleInfiniteInheritanceresharper_possible_infinite_inheritance_highlightingWarning
Possible multiple enumerationPossibleMultipleEnumerationresharper_possible_multiple_enumeration_highlightingWarning
Possible write to 'Me'PossibleWriteToMeresharper_possible_write_to_me_highlightingWarning
Possibly impure struct method is called on readonly variable: struct value always copied before invocationPossiblyImpureMethodCallOnReadonlyVariableresharper_possibly_impure_method_call_on_readonly_variable_highlightingWarning
Return value of pure method is not usedReturnValueOfPureMethodIsNotUsedresharper_return_value_of_pure_method_is_not_used_highlightingWarning
Similar expressions comparisonEqualExpressionComparisonresharper_equal_expression_comparison_highlightingWarning
Static field or auto-property in generic typeStaticMemberInGenericTyperesharper_static_member_in_generic_type_highlightingWarning
Static member initializer refers to static member below or in other partStaticMemberInitializerReferesToMemberBelowresharper_static_member_initializer_referes_to_member_below_highlightingWarning
String formatting method problemsFormatStringProblemresharper_format_string_problem_highlightingWarning
Suspicious type conversion or checkSuspiciousTypeConversion.Globalresharper_suspicious_type_conversion_global_highlightingWarning
Symbol from module that might be missing at runtimeSymbolFromNotCopiedLocallyReferenceUsedWarningresharper_symbol_from_not_copied_locally_reference_used_warning_highlightingWarning
The 'l' suffix is easily confused with the digit '1'LongLiteralEndingLowerLresharper_long_literal_ending_lower_l_highlightingWarning
Thread static field has initializerThreadStaticFieldHasInitializerresharper_thread_static_field_has_initializer_highlightingWarning
Type check and casts can be mergedMergeCastWithTypeCheckresharper_merge_cast_with_type_check_highlightingSuggestion
Unassigned field (non-private accessibility)UnassignedField.Globalresharper_unassigned_field_global_highlightingSuggestion
Unassigned field (private accessibility)UnassignedField.Localresharper_unassigned_field_local_highlightingWarning
Unassigned readonly fieldUnassignedReadonlyFieldresharper_unassigned_readonly_field_highlightingWarning
Use format specifier in format stringsUseFormatSpecifierInFormatStringresharper_use_format_specifier_in_format_string_highlightingSuggestion
Value assigned to a property of non-variable qualifier expression can be lostPossibleStructMemberModificationOfNonVariableStructresharper_possible_struct_member_modification_of_non_variable_struct_highlightingWarning
'void' method is annotated by [Pure] attributePureAttributeOnVoidMethodresharper_pure_attribute_on_void_method_highlightingWarning

Redundancies in Code (22 inspections)

Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup.
InspectionIDEditorConfig propertyDefault severity
Assignment is not usedRedundantAssignmentresharper_redundant_assignment_highlightingWarning
Explicit 'value' parameter declaration is redundantRedundantSetterValueParameterDeclarationresharper_redundant_setter_value_parameter_declaration_highlightingHint
Expression is always 'true' or always 'false'ConditionIsAlwaysTrueOrFalseresharper_condition_is_always_true_or_false_highlightingWarning
Iterator function without 'Yield' statementsRedundantIteratorKeywordresharper_redundant_iterator_keyword_highlightingWarning
Keyword 'Then' is redundant in multiline 'If' statementRedundantIfStatementThenKeywordresharper_redundant_if_statement_then_keyword_highlightingDisabled
Parameterless property parentheses are redundantRedundantPropertyParenthesesresharper_redundant_property_parentheses_highlightingHint
Parentheses are redundant if attribute has no argumentsRedundantAttributeParenthesesresharper_redundant_attribute_parentheses_highlightingHint
Redundant array lower bound specificationRedundantArrayLowerBoundSpecificationresharper_redundant_array_lower_bound_specification_highlightingWarning
Redundant castRedundantCastresharper_redundant_cast_highlightingWarning
Redundant empty 'Case Else' statementRedundantEmptyCaseElseresharper_redundant_empty_case_else_highlightingWarning
Redundant explicit size specification in array creationRedundantExplicitArraySizeresharper_redundant_explicit_array_size_highlightingWarning
Redundant 'Me.' qualifierRedundantMeQualifierresharper_redundant_me_qualifier_highlightingWarning
Redundant 'MyBase.' qualifierRedundantMyBaseQualifierresharper_redundant_my_base_qualifier_highlightingWarning
Redundant 'MyClass.' qualifierRedundantMyClassQualifierresharper_redundant_my_class_qualifier_highlightingWarning
Redundant operand in logical conditional expressionRedundantLogicalConditionalExpressionOperandresharper_redundant_logical_conditional_expression_operand_highlightingWarning
Redundant qualifierRedundantQualifierresharper_redundant_qualifier_highlightingWarning
Remove redundant parenthesesRedundantParenthesesresharper_redundant_parentheses_highlightingDisabled
Unreachable codeVbUnreachableCoderesharper_vb_unreachable_code_highlightingWarning
Unused import clauseUnusedImportClauseresharper_unused_import_clause_highlightingWarning
Use implicit 'ByVal' modifierUseImplicitByValModifierresharper_use_implicit_by_val_modifier_highlightingHint
Use implicitly typed variable declarationUseImplicitlyTypedVariableresharper_use_implicitly_typed_variable_highlightingDisabled
Use implicitly typed variable declaration (evident)UseImplicitlyTypedVariableEvidentresharper_use_implicitly_typed_variable_evident_highlightingHint

Redundancies in Symbol Declarations (28 inspections)

This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations.
InspectionIDEditorConfig propertyDefault severity
Class with virtual (overridable) members never inherited (non-private accessibility)ClassWithVirtualMembersNeverInherited.Globalresharper_class_with_virtual_members_never_inherited_global_highlightingSuggestion
Class with virtual (overridable) members never inherited (private accessibility)ClassWithVirtualMembersNeverInherited.Localresharper_class_with_virtual_members_never_inherited_local_highlightingSuggestion
Local entity is only used to capture its nameLocalNameCapturedOnlyresharper_local_name_captured_only_highlightingWarning
Local function is never usedUnusedLocalFunction.Compilerresharper_unused_local_function_compiler_highlightingWarning
Local function is never usedUnusedLocalFunctionresharper_unused_local_function_highlightingWarning
Local function return value is never usedUnusedLocalFunctionReturnValueresharper_unused_local_function_return_value_highlightingWarning
Method return value is never used (non-private accessibility)UnusedMethodReturnValue.Globalresharper_unused_method_return_value_global_highlightingSuggestion
Method return value is never used (private accessibility)UnusedMethodReturnValue.Localresharper_unused_method_return_value_local_highlightingWarning
Non-accessed local variableNotAccessedVariableresharper_not_accessed_variable_highlightingWarning
Parameter is only used for precondition check (non-private accessibility)ParameterOnlyUsedForPreconditionCheck.Globalresharper_parameter_only_used_for_precondition_check_global_highlightingSuggestion
Parameter is only used for precondition check (private accessibility)ParameterOnlyUsedForPreconditionCheck.Localresharper_parameter_only_used_for_precondition_check_local_highlightingWarning
Type is never used (non-private accessibility)UnusedType.Globalresharper_unused_type_global_highlightingSuggestion
Type is never used (private accessibility)UnusedType.Localresharper_unused_type_local_highlightingWarning
Type member is never accessed via base type (non-private accessibility)UnusedMemberInSuper.Globalresharper_unused_member_in_super_global_highlightingSuggestion
Type member is never accessed via base type (private accessibility)UnusedMemberInSuper.Localresharper_unused_member_in_super_local_highlightingWarning
Type member is never used (non-private accessibility)UnusedMember.Globalresharper_unused_member_global_highlightingSuggestion
Type member is never used (private accessibility)UnusedMember.Localresharper_unused_member_local_highlightingWarning
Type member is only used in overrides (non-private accessibility)UnusedMemberHierarchy.Globalresharper_unused_member_hierarchy_global_highlightingSuggestion
Type member is only used in overrides (private accessibility)UnusedMemberHierarchy.Localresharper_unused_member_hierarchy_local_highlightingWarning
Unused labelUnusedLabelresharper_unused_label_highlightingWarning
Unused local variableUnusedVariableresharper_unused_variable_highlightingWarning
Unused parameter (non-private accessibility)UnusedParameter.Globalresharper_unused_parameter_global_highlightingSuggestion
Unused parameter (private accessibility)UnusedParameter.Localresharper_unused_parameter_local_highlightingWarning
Unused parameter in partial methodUnusedParameterInPartialMethodresharper_unused_parameter_in_partial_method_highlightingWarning
Unused parameter of local functionUnusedLocalFunctionParameterresharper_unused_local_function_parameter_highlightingWarning
Unused type parameterUnusedTypeParameterresharper_unused_type_parameter_highlightingWarning
Virtual (overridable) member is never overridden (non-private accessibility)VirtualMemberNeverOverridden.Globalresharper_virtual_member_never_overridden_global_highlightingSuggestion
Virtual (overridable) member is never overridden (private accessibility)VirtualMemberNeverOverridden.Localresharper_virtual_member_never_overridden_local_highlightingSuggestion

Spelling issues (3 inspections)

These inspections detect typos in various contexts.
InspectionIDEditorConfig propertyDefault severity
Typo in commentCommentTyporesharper_comment_typo_highlightingSuggestion
Typo in identifierIdentifierTyporesharper_identifier_typo_highlightingSuggestion
Typo in string literalStringLiteralTyporesharper_string_literal_typo_highlightingSuggestion
Last modified: 15 July 2020