Warning: Undefined array key "stylesheets" in /customers/8/7/8/dwpdesign.se/httpd.www/dokuwiki/inc/StyleUtils.php on line 102

Table of Contents

C#

C# is a object oriented programming language.

Value types

Bool

Byte

Char

Decimal

Double

Enum

Float

Int

Long

Sbyte

Short

String

Struct

Uint

Ulong

Ushort

Inheritance

Calling a method from the super class:

base.doSomthing()

Because C# does not support multi inheritance the best way to work around that are to use interfaces. They can contain method and attribute signatures that are written inside other classes.

Classes

Abstract class

An abstract class exist purely to be inherited from. They will never be able to be instantiated in C#. They can be very useful making code reusable in several other different sub classes.

abstract class className {}

Encapsulation

C# uses encapsulation through keywords before the class name and/or before a variable name.