When to use CType, TryCast, DirectCast, CBool, etc.
Posted by: DevX: .NET Feed,
on 29 Aug 2016 |
View original | Bookmarked: 0 time(s)
Language: .NET||Expertise: BeginnerWhen you need to cast some type to another type in VB, you should favor the "classical" functions CBool, CByte, CInt, CLng, CDec, CSng, CDbl, CDate, CStr and the "new" kids on the block (CSByte, CShort, CUShort, CUInt, CULng, CChar, and CObj) as they were designed exactly for it....