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 Difference between directcast and ctype?

Answers were Sorted based on User's Feedback



What is the Difference between directcast and ctype?..

Answer / aravindreddy

DirectCast requires the run-time type of an object variable
to bethe same
as the specified type.The run-time performance
ofDirectCast is better
than that of CType, if the specified type and the run-time
typeof the
expression are the same.
Ctype works fine if there is a valid conversion defined
between the
expression and the type.

Is This Answer Correct ?    16 Yes 2 No

What is the Difference between directcast and ctype?..

Answer / narayan sahu(netx)

The difference between the two keywords is that CType
succeeds as long as there is a valid conversion defined
between the expression and the type, whereas DirectCast
requires the run-time type of an object variable to be the
same as the specified type. If the specified type and the
run-time type of the expression are the same, however, the
run-time performance of DirectCast is better than that of
CType. DirectCast throws an InvalidCastException error if
the argument types do not match.

Is This Answer Correct ?    12 Yes 3 No

What is the Difference between directcast and ctype?..

Answer / suresh

Direct cast: Supports only reference type conversions
it throws exception

CType cast: supports only Value type conversions

Is This Answer Correct ?    7 Yes 22 No

Post New Answer

More Dot Net General Interview Questions

can any one tel me the complete Testing Procedure of any one simple PROJECT i mean either web/windows based application?

0 Answers  


I was working for software company frm 2005 to 2009. I left job due to recession.I was jobless till dec 09 then i got job in bpo and i am not knowing what to do as my professional experience is with software.give me any suggestion.

0 Answers  


What are the new thee features of com+ services, which are not there in com (mts)?

0 Answers  


Will it go to finally block if there is no exception happened?

0 Answers  


What are the new 2.0 features useful for?

0 Answers  


Explain about managed heap?

0 Answers  


Explain weg config settings for exception managment in asp.net?

1 Answers   C Squared Systems,


what is ItemTemplate and EditTemplate and FooterTemplate? what is the Purpose of useing template columns in datagrid?

1 Answers  


Please explain what are an object and a class?

0 Answers  


What is reflection in microsoft .net context?

0 Answers  


Explain how garbage collection works?

0 Answers  


1 mor thing guyz....can i go for C# directly without C++ /JAVA knowledge for dot net ..???

3 Answers  


Categories