What is the Difference between directcast and ctype?
Answer Posted / 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 |
Post New Answer View All Answers
How boxing and unboxing occures in memory?
What is difference between system.string and system.stringbuilder classes?
What is "microsoft intermediate language" (msil)?
What is meant by globalization?
Please explain what do the terms “boxing” and “unboxing” mean?
How to prepare parametrized (with more than one parameters) crystal report.pls tell me the code procedure, if any body can?
What is connection pooling and how do you make your application use it?
What are Satellite Assemblies? How you will create this? How will you get the different language strings?
Differences between dll and exe?
Explain the garbage collection process?
What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?
Explain the process of compilation in .NET?
object is physical and class is logical..here class is not occupying any memory as our definition of class but i got a question then the class where it stores if it is not occupying any memory....
If any body working in Infosys, please can u give me the referense to that company because i hered that their is openings for freshers with referal..
What is the best way to crack the certification?