OOP i C#

Get Started. It's Free
or sign up with your email address
Rocket clouds
OOP i C# by Mind Map: OOP i C#

1. Klasser

1.1. [Accessor] class ClassName { // class contents }

1.2. Public

1.2.1. No access restrictions

1.3. Private

1.3.1. The class is only accessible from within its declaration context.

1.4. Protected

1.4.1. The class is only accessible from within its own class or derived classes.

1.5. Internal

1.5.1. The class is only accessible from within the assembly that contains it.

1.6. Protected internal

1.6.1. The class is only accessible from within its own class, a derived class, or its containing assembly.

2. constructor

2.1. special method that runs when the class is instantiated

2.2. Har samme navn som klassen

2.3. Overloading

2.3.1. Har flere constructors

2.3.2. Ulik signatur Ulikt antall parametre

3. Properties

3.1. control the characteristics of a class,

3.2. expose to users of the class some internal values

3.3. public int ProductID { get{ return _ProductID; } set{ _productID = value; } }

3.3.1. int pid = item.ProductID;

3.3.2. item.ProductID = 123;

3.4. abstraction.

3.4.1. Skjule intern funksjonalitet

3.5. Syntaks

3.5.1. Property Item

3.5.2. intern variabel _item

4. Methods

4.1. [Accessor] DataType FunctionName([parameters]) { return value }

4.1.1. Uten returverdi void

4.2. override

4.2.1. a new implementation of a member that is inherited from a base class

4.2.2. polymorphism,

5. Shared class members

5.1. Static memebers

5.2. A class instance is not required,

5.3. [Accessor] static returntype Name()

6. Inheritance

6.1. partial class NewClass:DerivedClass

6.2. virtual method

6.2.1. inheriting classes can override the method and provide their own implementation.

7. Member Access

7.1. protected member

7.1.1. is accessible within its class and by derived classes

8. Scope and lifetime

8.1. Variabler lever innen den kode blokken den er definert

9. Generics

9.1. let you tailor a method, class, structure, or interface to the precise data type it acts upon

9.2. List<Custom Class> name