W
Wayland
I'm programming in C# and I have a class diagram in which I want to display
properties for the class. How can I do this? I only see attributes and
operations.
Is there a way to denote that a property is read-only, i.e. only contains a
get method?
Also, constructors are not labeled as such, only operations with no return
method.
This is a sample class I want to document:
class 1
{
// attributes
private bool isInitialized = false;
private int count = 0;
// constructor
public class1(){}
// property
public bool IsInitialized
{
get{return isInitialized;}
set{isInitialized = value;}
}
// read only property
public int Count
{
get{return count;}
}
// operation
public void IncrementCount()
{
count++;
}
}
properties for the class. How can I do this? I only see attributes and
operations.
Is there a way to denote that a property is read-only, i.e. only contains a
get method?
Also, constructors are not labeled as such, only operations with no return
method.
This is a sample class I want to document:
class 1
{
// attributes
private bool isInitialized = false;
private int count = 0;
// constructor
public class1(){}
// property
public bool IsInitialized
{
get{return isInitialized;}
set{isInitialized = value;}
}
// read only property
public int Count
{
get{return count;}
}
// operation
public void IncrementCount()
{
count++;
}
}