Answer:
DirectCast requires the object variable to be the same in both the run-time type and the specified type.
If the specified type and the run-time type of the expression are the same, then the run-time performance of DirectCast is better than that of CType.
Ctype works fine if there is a valid conversion defined between the expression and the type.
Asked In: Many Interviews |
Alert Moderator