0

It looks like directcast require actual implementation or inheritance and success. It looks to me the way it is implemented is that vb.net will simply change the pointer type without bother changing anything.

Ctype works as long as there are conversion. Does that mean it runs conversion constructor?

rene
  • 41,474
  • 78
  • 114
  • 152
user4951
  • 32,206
  • 53
  • 172
  • 282
  • 1
    `CType` is an *operator* in VB.NET, despite the fact that it looks suspiciously like a function. Exactly how it works depends on how it's used and what it's applied to. More details here: http://msdn.microsoft.com/en-us/library/aa289509%28VS.71%29.aspx#vbtchmicrosoftvisualbasicnetinternalsanchor10 – Cody Gray - on strike Jan 29 '12 at 11:06
  • 1
    possible duplicate of [Casting DataTypes with DirectCast, CType, TryCast](http://stackoverflow.com/questions/2703585/casting-datatypes-with-directcast-ctype-trycast), [Difference between DirectCast() and CType() in VB.Net](http://stackoverflow.com/questions/3056514/difference-between-directcast-and-ctype-in-vb-net) – Cody Gray - on strike Jan 29 '12 at 11:08

0 Answers0