Please enable JavaScript.
Coggle requires JavaScript to display documents.
CLASSES - Coggle Diagram
CLASSES
MODIFIERS
Access
Public
Getter/Setter
Private
FieldsDefine
_camelCase
Protected
Internal
Internal
PROPERTIES
ClassMember
Getter/Setter
Create
LessCode
Auto-Implemented
public int Val {get; set;}
public int Val {..}
get { return _val; }
set { _val = value; }
Unsettable
Remove
set
Once-settable
private set;
INDEXERS
public string
this[string key] {...}
get {...}
_dict[key]
set {...}
_dict[key] = value
Customer["key"]
METHODS
Modifiers
Params
Passing
Varying
No
Params
func(params int[] mList)
Use
func(new int[] {1,2,3})
func(1,2,3)
Ref
Pass
Reference
OfValue
func(ref int a)
Use
func(ref b)
Out
Similar
Ref
Requires
Setting/Change
Value
ASSOCIATION
Coupling
Loosely
Tightly
Inheritance
Is-A-Relation
Using
Child : Parent {..}
public class
Benefits
Code-Reuse
Polymophic
Only
1-Parent
Composition
Benefits
Less-coupling
Code-reuse
Flexibility
Has-A-Relation
Using
public Car(Engine engine)
Favor
Over
Inheritance
MEMBERS
Instance
Static
Singleton
Concepts
INITIALIZE
Constructor
ExecuteOther
public Customer(int id) : this(id) {...}
UseWhen
State
IsEssential
Overloading
Object
Without
Constructor
new Person { Name="a", Age=25 }
FIELDS
Initialize
OutsideConstr
Can
If-Input
Independent
Readonly
Initialized
Only-In
FieldDeclaration
Constructor