Академический Документы
Профессиональный Документы
Культура Документы
2.5/ - (C) 2007 - FABIAN SOSA ESCALADA provides access to a characteristic of an object or a class / setter and getter /
represents a variable a value that associated can be with an computed at object or unique compile-time class signature
unique signature
inheritance
constitutent types (types used in member declarations) what members inherits from his base class inherited members are accesible derived (other classes can inherit this one ) base class ( this class inherits from ohter ) nested class implicity made... declaration modifiers members implicicity made... type of inheritance
members
executable code
define operators
instantiated
properties
constants
definition
methods
class
reference type
yes
All except it depends instance on transit several, and constr., yes accesibility ive re-implement finalizers, and modifier static constr.
constant field PTIN is the only inside PB, PT, property event allowed function INPT, IN, indexer, return combination of members PV (D) * type of mem. access (*) method* mod.
NW, PB, NW, PB, PT, NW, PB, PT, IN, PV, NW, PB, PT, IN, PV, ST, PT, IN, PV, ST, VR, SD, IN, PV VR, SD, OV, ST, RO, VL OV, AT, EX AT * can have variables and values but they must be null (*) nothing
abstract class
can't be instantiate d
yes
yes
yes
yes
NO
NO yes
NO can't be
NO
NO yes
yes
struct
value type
not support definition , but not inherits from supported System.ValueT ype Base interfaces!
several, and NW, PB, N.A. re-implement PT, IN, PV NW (only in nested) PB, PT, INT, PV * cannot be declared AT, PB, PT, IN, PV, VR, OV, ST
yes
yes
yes
yes
yes
yes
interface
define a contract
NO
yes
yes
Diagram version: 2.0.0.1 Monday, October 8, 2007 PB = PUBLIC / PT = PROTECTED / PV = PRIVATE / IN = INTERNAL / ST = STATIC / VR = VIRTUAL / EX = EXTERNAL / AT = ABSTRACT / SD = SEALED / NW = NEW / RO = READ ONLY / VL = VOLATILE / OV =OVERRIDE / N.A. = NOT APPLICABLE
indexers
general
events
fields
unique signature
This diagram contains the most relevant points about the C# 2.0 language elements of the left column. Some obvious things are not present in the diagram to reduce the amount of text. I designed this diagram just to help myself in the migration from C++ and Delphi to C# so... be cool and provide some feedback!
embers
partial modifier allowed can declare virtual members ( polymorphic behavior ) constants and nested types instance constructors static constructors instance member
modifier particularities
new modifier / hides inherited member protected modifier protected internal abstract modifier
internal modifier
types ( nested )
private modifier
sealed modifier
public modifier
static member
static modifier
constructor
operators
finalizers
yes
yes
yes
yes
yes
NO
1. When a non-abstract class is derived from an abstract class, the non-abstract class shall include actual implementations of all inherited abstract members, thereby overriding those abstract members NO NO must have impossible no 1. implicity inherits from type object The sealed modifier is used to prevent derivation from a class N.A. Since inheritance isnt supported
2. Explicit interface member implementations cannot be abstract, but explicit interface member implementations are of course permitted to call abstract methods 2. shall only have static members, and shall not have protected internal
doesn't have
yes, can cannot define, declare but implicitly has yes having a parameterless paramete one rs
NO!
yes
1. the simple types provided by C#, such as int, double, and bool, are, in fact, all 2. values can't be null are structs types