Operator '<operatorsymbol>' doesn't return a value on all code paths
Operator '<operatorsymbol>' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used.
An operator procedure has at least one possible path through its code that does not return a value.
You can return a value from an operator procedure only by including it in a Return Statement.
If control passes to the End Operator
statement, the operator procedure returns the default value of the property's data type. For more information, see "Behavior" in Function Statement.
By default, this message is a warning. For more information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.
Error ID: BC42106
- Check your control flow logic and make sure every possible path ends with a
Return
statement. In particular, the last statement beforeEnd Operator
should be aReturn
statement.
.NET feedback
.NET is an open source project. Select a link to provide feedback: