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

1. Generics

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

1.2. List<Custom Class> name

2. Scope and lifetime

2.1. Variables live within the code block it is defined

3. Member Access

3.1. protected member

3.1.1. is accessible within its class and by derived classes

4. Inheritance

4.1. partial class NewClass:DerivedClass

4.2. virtual method

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

5. Shared class members

5.1. Static memebers

5.2. A class instance is not required,

5.3. [Accessor] static returntype Name()

6. Methods

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

6.1.1. Without return value void

6.2. override

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

6.2.2. polymorphism,

7. Class

7.1. [Access Modifiers] <Class type> Name { // class contents }

7.2. Public

7.2.1. Can access from any where

7.3. Private

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

7.4. Protected

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

7.5. Internal

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

7.6. Protected internal

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

8. constructor

8.1. special method that runs when the class is instantiated

8.2. Has the same name as the class

8.3. Overloading

8.3.1. Has several constructors

8.3.2. Different signature

8.3.2.1. Different number of parameters

9. Properties

9.1. control the characteristics of a class,

9.2. expose to users of the class some internal values

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

9.3.1. int pid = item.ProductID;

9.3.2. item.ProductID = 123;

9.4. abstraction.

9.4.1. Hide internal functionality

9.5. syntax

9.5.1. Property Item

9.5.2. intern variabel _item