In the Visual Studio extension for C# (version 2022.6), when a new C# Program is added to a project, the template includes this code section:
[Program]
public class Program1
{
// Use the attributes [Global] and either [InputPort] or [OutputPort] to mark fields,
// that should exchange data with other IEC- or C#-Programs
[Global, OutputPort]
public int a = 1;
[Global, InputPort]
public int b = 2;
public int c = 3;
:
This gives the impression that the variables b and c are both InputPort variables, when in fact only b is an input port variable.
Perhaps this could be made clearer in the template, maybe with a comment after the declaration of variable c.
In the Visual Studio extension for C# (version 2022.6), when a new C# Program is added to a project, the template includes this code section:
This gives the impression that the variables
b
andc
are bothInputPort
variables, when in fact onlyb
is an input port variable.Perhaps this could be made clearer in the template, maybe with a comment after the declaration of variable
c
.