Book a Demo

Author Topic: C# Properties - How to Tell if Read-only  (Read 3407 times)

DMT

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
C# Properties - How to Tell if Read-only
« on: June 04, 2003, 04:56:30 am »
When I create a property for a private attribute, it gives me the opportunity to check the read and/or write boxes in the property dialog. However, there doesn't appear to be any way to tell by looking at the operation that gets created whether or not it's read-only, read/write, etc.

Is there any way to determine this? If I open the property dialog from the attribute, it always shows both the read and write boxes checked, even if I made the property read-only when I created it.

Also, if I create an operation with the property stereotype that isn't tied to an attribute, I'd like to be able to specify that it's a read-only property. (For example, a property that returns a bool based upon the state of several member variables.)

DMT

  • EA User
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: C# Properties - How to Tell if Read-only
« Reply #1 on: June 10, 2003, 11:36:49 am »
I now have a variation on this one--how to tell if it's a read-only property in the diagram.

I'm finding that as I look at my design, I have no way of telling which are read-only or read/write properties in C#.

Has anyone else come up with a good answer?