Tuesday, April 27, 2010

Generilization and Specialization

This is another name for the Inheritance
Generilization is the general features of the code in the class
and spelization are the special features of the class

Monday, April 26, 2010

Immediate Window

working with the memory directly

start with ? and type the objects and that would be effected.

Code Snippets

There are the readymade code templates used in the VS IDE.

e.g type if TAB +TAB (hit tab twice)

type for TAB+TAB

switch TAB+TAB

one of the commonly usedone is property and for this type
PROPFULL TAB+TAB
and this would create a get set property as well the private variable
private int myVar

public int MyProperty
{
get { return myVar;}
set {muVar=values;}
}
and if you wanna change int to string change string and hit tab and all the references would be effected automatically

In order to find all the snippets you can click CTRL+K+X
also you can find this in EDIT +Insert Snippet from the menu

to creat our own you need to snippet editor avaliable for free

Association

There are two basic types of association
Aggregation & Containment

the best word to express it would be custome reference types

e.g
Class Engine { public int HoursePower; }

class Auto { public Engine Engine; }

Main Class

{
PSVM {
Auto myCar=new Auto();
myCar.Engine=V6;
Console.writeline(myCar.Engine.HoursePower.toString());
}

relation between mycar and Engine is Aggreation

What are Helper methods

Helper method is the common method which contains the common functionality of a group of code that is used in the class. So insted of writing the code againg and again developer write a HELPER method that can be used for recurring functionality.

most common examples for these are

common methods to output
formating things
mutliple use
refracting

What are properties

these are the gate keepers for our private fields.

Camel Case

Camel Case
it starts with the small letter and for every word it is Caps first letter

public string aaaAaa
private int intNumber


Pascal Case
Also everything that is public should always start with Caps letter
and everything that is private should always start with small letter