Archive for February, 2009

How to call base class constructor in c#.net ?

This item was filled under [ Interview Questions ]

example:
class one
{
one()
{
}
}
//This is Inheritance of base class.
class two:one
{
//this is the way to calling base class constructor
two:one()
{
}
}
By Inheriting the base class we can reuse the functionality of  base class in to sub class
here one is base class two is sub class.

Continue reading...

What is object ?

This item was filled under [ Interview Questions ]

Object is nothing but memory allocation for to store values and do some functions.The main usage of object is reusable.Objects are expose the behaviour of class.by creating objects we can use the fucntionality of class for various different type of actions.
example:
class one
{
int a,b,c;
public one()
{
a=0;
b=0;
c=0;
}
public int add(int a,int b)
{
c=a+b;
return c;
}
}
//here is the entry point.
static class entry_point
{
static [...]

Continue reading...

Tagged with: [ , ]

How to create class in c#.net?

This item was filled under [ Interview Questions ]

Class having the structure like c++ and java in c#.net and microsoft adding some functionality for class. the structure of class is below.
class class_name
{
//here we can declare members.
public | private | protected | protected internal member_name;
class_name()// this called constructor.
{
//here we can assign values for members.
member_name=values;
}
//here we can declare member function.
public | private | protected | [...]

Continue reading...

Tagged with: [ , ]

What is class ?

This item was filled under [ Interview Questions ]

Class is user defined type, which can have members and member functions. and Class is a schema of objects. each and every objects will reflect the same structure of this class. while creating objects for class some memory allocated for storing values of members and do the functionality of member functions.

Continue reading...

Tagged with: [ , ]