Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 638 Bytes

File metadata and controls

11 lines (6 loc) · 638 Bytes

Iec041 - Init/ctor must only be called once in Init or __Init

Severity: Error Error

The __Init() method (in classes attributed with [FunctionBlock] or [Program]) and the Init() method of a user type (struct 's attributed with [Structure], [Array] or [String]) must only call ctor()/Init() once on their fields.

Solution

You can also use the provided automatic Code Fix to remove the duplicate calls to ctor()/Init() methods on a field. ( Press Alt + Enter on the Error line to find the Code Fix in the context menu)

Remove the duplicate calls to ctor()/Init() on a field.