ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net General
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
What is the Difference between directcast and ctype?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the Difference between directcast and ctype?
Answer
# 1
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 ?    5 Yes 0 No
Aravindreddy
 
  Re: What is the Difference between directcast and ctype?
Answer
# 2
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 ?    5 Yes 1 No
Narayan Sahu(netx)
 
 
 
  Re: What is the Difference between directcast and ctype?
Answer
# 3
Direct cast: Supports only reference type conversions
             it throws exception

CType cast: supports only Value type conversions
 
Is This Answer Correct ?    0 Yes 12 No
Suresh
 

 
 
 
Other Dot Net General Interview Questions
 
  Question Asked @ Answers
 
What is WSDL and disco file ? TCS3
how to connect database connectivity in dotNET? if suppose SQL server?and also MS access?  5
how we can capture the value in textbox when selectedvluechanged event of gridview is fired  1
Which server tag comes from server when we submit any data  1
What are object pooling and connection pooling and difference? TCS3
What is use of ContextUtil class?  1
Hi, Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Got Exception in "try" block. Which "catch" throws exception and Why??? Please provide the answer in detail.. Thanks for the help!!! 3i-Infotech2
Can u any body send the DotNet Interview questions and answers to my mail please....... mindukuru@yahoo.com  1
What are the contents of assembly? Ksb4
What is CLR, CLS,CTS Deloitte2
What are server controls? Avanade1
Why DLL files are needed. & how They are Created in DOTNET?  1
What is smart navigation?  2
Without UDDI, is it possible to access a remote web service ? TCS1
Difference between Debugging and tracing in .net  1
What is view state? TCS4
What is exception handling?  1
What is the model role in Mvc architecture?  3
What?s SingleCall activation mode used for?  1
What is Delegate? Have ever used Delegates in your project. Deloitte1
 
For more Dot Net General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com