Hi, this is my first post, very new to EA and UML, but love it so far!
I'm putting a class diagram together, and I've hit a wall. My target language is C#, and I'm creating a class that is derived from one of the existing System classes. I've imported the appropriate binary module, and created the derived class... so far so good.
One of the base class properties is protected, but I'd like to create a public read-only property in the derived class that returns its value. This is what I've tried so far:
Attempt #1: Created an attribute and checked the 'Property' box. Filled in the appropriate details. However, it creates a new attribute with the same name as the attribute in the base class, which obviously won't compile without manually removing it from the generated code.
Attempt #2: Instead of creating an attribute, I created an operation, and gave it a stereotype of 'property'. However, I can't figure out how to restrict it to read-only, and the resulting code looks like this:
public IList Regions{
get{
return <unknown>;
}
set{
<unknown> = value;
}
}
The <unknown> text should obviously be the value from the base class. I've probably overlooked something obvious from the manual, but if anyone can point me in the right direction, I'd really appreciate it!