C# Programming With DRAKON Editor
C# Programming With DRAKON Editor
C# Programming With DRAKON Editor
3. Add keywords, arguments and the return type to the parameters item of the diagram.
Keywords
Access: public, protected, private, internal.
Dispatch: virtual, abstract, static, override
ctr turns the method into a constructor.
Loop syntax
The Loop start icon is similar to the standard C# for construct. There are two ways to use Loop
start:
1. Three expressions separated by semicolons:
The Loop start item should have: foreach Type loopVar; collection
There is a limitation: the type of the loop variable cannot be var.
The collection must implement the IEnumerable<T> interface.
The loop variable name must be unique within the diagram.
Examples
Parameters item
public
protected ctr
protected ClassName() {
public static
int left
int right
returns String
protected override
String foo
protected abstract
returns int
Problems
Problem: the C# compiler may complain that a variable is not initialized before use.
How to solve: declare and initialize the variable at the beginning of the diagram.