Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 795 Bytes

File metadata and controls

18 lines (11 loc) · 795 Bytes

Iec030 - IEC Structs have to provide an Init Method calling field's Init/ctor method when any fields have it

Severity: Error Error

For all fields that provide an Init() or ctor() method of structs attributed with [Structure], the method has to be called in the Init() method of the Structure. The method looks like this:

 public void Init() {}

Mostly IEC Strings provide a ctor() method and user types often provide an Init() method.

Solution

You can also use the provided automatic Code Fix to create all missing calls and the Init() method itself. ( Press Alt + Enter on the Error line to find the Code Fix in the context menu)

Provide the Init() method and call the Init()/ctor() methods of all fields.