Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 938 Bytes

File metadata and controls

25 lines (16 loc) · 938 Bytes

Iec044 - Output parameter name unequal to method name

Severity: Error Error

The parameter is an Output and must have the same name as the method. It applies for first parameters when:

  • the method has a [Function] attribute and is inside a class marked with [FunctionContainer] and:
    • the parameter has the attribute [Output]
    • or the parameter has the keyword ref
    • or the parameter has the keyword out
    • or the method has the [Eno] attribute and bool return value.
  • or the method has a [User] attribute and:
    • the parameter has the attribute [Output]
    • or the parameter has the keyword ref
    • or the parameter has the keyword out

Solution

You can also use the provided automatic Code Fix to rename the parameter. ( Press Alt + Enter on the Error line to find the Code Fix in the context menu)

Rename the parameter to match the method name (or the other way round).