Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why do we use Overloading, Overriding, Boxing, Unboxing,
and what is the use of these ?

Answer Posted / vijay rana

overloding:- if we want to use a function which have
different behaviour in different situation means for
different signature it behaves differently it is called
function overloding
overriding:- if we want a function which have the same
behaviour in the supercalss as well as in the subclass also
and in the case of overriding method signature and return
type should be same , it is called method overriding
boxing:
if we want to convert a value type value in an object it
is called boxing
for example
int m=10;
object om=10;
it does not require any explicitly conversion
unboxing:-unboxing means when we want to convert a object
type to a value type , it is called unboxing
int m=10
object om=m;
byte n=(byte)om;

Is This Answer Correct ?    30 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find methods of a assembly file (not using ILDASM)?

1209


How do I convert a string to an int in c#?

1034


Define delegation in .net?

956


Can we inherit a private class in c#?

946


What is difference between dictionary and hashtable in c#?

928


What are class fields?

1013


Define parsing?

951


What is the implicit name of the parameter that gets passed into the set method/property of a class?

971


What is a partial class in c#?

1112


Explain the different ways a method can be overloaded?

923


Why do I get an error (cs1006) when trying to declare a method without specifying a return type?

975


Which of these string definitions will prevent escaping on backslashes in c#?

1053


What's the difference between System.String and System..StringBuilder in C#?

1072


What is xml serializer?

960


Can extension methods access private members?

963