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...

what is the diference between casting and converting?

Answer Posted / kiran vaidya

When you use Convert class, you have some predefined types
which are defined by .Net framework such as Convert.ToInt32
or Convert.ToString and so on. That means you can convert
whatever you want to only system defined types.

while in casting, you can have your own choices to convert
data. i.e. user defined types.

for eg. you have a class called Employee and you want to
convert some object to Employee, then the best way to do
this is casting.

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1013


What is class sortedlist underneath?

1007


What is an assembly in dotnet?

1046


What is a method signature?

1040


What are jagged arrays used for?

984


What is Co- and Contra-Variance in C#?

1027


what is difference between destruct or and garbage collection ?

991


What is a cshtml file?

1195


When was c# created?

1044


What is difference between private and static constructor?

980


How many types of variables are there in c#?

1016


Is arraylist type safe in c#?

1051


How to parse a date time string?

1066


What is parameterized constructor?

983


What is anonymous types in c#?

977