Any option for Enterprise Architect to recognize optional parameters in C #?
I tried to import the existing code and get the following error:
An error occurred while parsing C: \ MyProject \ FooBar.cs on line 30. Unexpected character: =
The code:
public void Foo(int bar = 1)
I also tried starting from scratch and generating code from Enterprise Architect. I created a class, then added an operation to this class and defined the parameters. The form for editing parameters allows me to specify "Name", "Type" and "Default" (as well as other information). I added Name: bar, Type: int, Default: 1. Then, when I generated the code, this is what I get (no optional parameter is generated!)
namespace System { public class FooBar {
What am I doing wrong?
source share