Numeric,Character,Boolean,Structures,Enumerations
2.const:Constants are like variables except that, once they have been assigned a value, they don't change.
const int ABSOLUTEZERO = -273;
3.array:An array is basically a group of variables of the same type, which are grouped together using a common name and which only differ by an index that is appended to that name, enclosed in square brackets.
string [] myString;
4.struct:Struct like the array, enables to group together related data into a single unit and each contained item can be referenced individually. int,double etc are simple data types, which only represent a single data value. Structs are data types, which contain more than one data value.
- They can contain data of multiple types,including other complex types
- They can contain data other than just name-value pairs, such as methods and properties
myStruct myStruct1; //Declaration, just like data types
5.enum:enum is a user defined complex data type that allows a variable to have a predefined, limited set of values.
enum Gender{Male = 0, Female = 1}
6.param:to set properties to any object
<param name="border" value="1">
7.Function or Method:Functions are mini-programs.If you want to use the same code in more than one place, you use functions. ASP.NET jumps away from the execution of the main body of code, runs through the commands specified in a function and then returns to the task of executing the mian body of code.
8.Passing Parameters by value:(the variable value is Read-only)By default, simple data values are passed to functions by value. This means that when the parameter variables are created inside the function, they are all set up to have the value that was passed in. Effectively, it means that inside a function, we are working with a copy of the original data.
Passing by value means that copy is made for the function to play with, and the value of the original variable in the calling code is left untouched.
Passing Parameters by Reference(ref keyword):(the variable value is Read and Write)When the function call is made, instead of a copy of the variable being taken of the value stored in the variable, the variable in the function is set to 'point' to the same piece of data represented by the variable, that is, a reference to the variable is created in the variable inside the function.
out parameters:(the variable is Write-only)The function itself has a value for the variable so we are just going to read the value from the function itself. In the function call we can change the value of the variable in the function.
9.Event:HTML:onmouseup,onmousedown,onmouseover,onmousemove,onclick,ondblclick,onkeyup,onkeypress,onkeydown,.NET:onLoad, onUnload, onClick/onCommand, onInit,onPrerender,Disposed,DataBinding,SelectIndexChanged,CheckChanged,TextChanged,page_init,page_load,page_unload etc are all events
10.object:An object is simply a bundle of code that describes some sort of real-world object. It might be a physical object(such as a book or a person) or abstract object(like a number). Anything that exists in the real world can be represented in some fashion as a software object.
11.abstraction:When we are defining a class, we don't want to define certain properties of the object. the details that we abstract about an object can be seperated into two main categories:
- Details that aren't relevant or appropriate to the particular situation we're modeling
- Details that are implicit, either to the specific situation, or in the functionality that is exposed
13.visibility(public,private,protected):public means we'll be able to use it from anywhere in our code.private and protected can be used to restrict the use to specific parts of an application.
14.accessor methods:get and set are two special methods that let us define the code that's used to respectively retrieve values from the private member and set values on it.
15.constructor:Constructors get the objects ready for use and set their data members to sensible values.
Car AlexCar; //declaration
AlexCar = new Car(); //initialization
The initialization stage of object instantiation is responsible for setting up the object in memory, and will call on a constructor method for that object to do the necessary work.
16.overloaded methods:When we overload an object method, each version should have a different signature(number of parameters or data type)
17.static(shared members):A shared(or static) member is one that operates across all instances of a class. It can be accessed via the object class itself as well as any specific instance of that class.
Two objects can share functionality that is properties and methods. Those properties and methods are called shared members(also called static members).we can define methods and properties that apply to the class as a whole, and not tie to a specific object.
Ex: all constructors methods are shared by definition
18.Association - 'Uses A':one class using another;If an object of class A can perform it's full set of functionality while having absolutely no awareness of class B,we can say that class A does not use class B.
Containment(also composition or aggregation) - A 'Has a' Relationship:When some class A defines a data member of class B, we can say that an object of class A contains an object of class B.
Inheritance - 'Is A':we can define a new class solely in terms of the differences between it and anothe class. Base class and derived class or sub class.
If you can say anything about a bas class A that cannot be said about a proposed subclass B, then B is not really a valid subclass A.
No comments:
Post a Comment