![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Let's say I have a dictionary where all the values are strings. Does anyone know if it is faster to say: dim s as string = directcast(_dictionary(key), string) or dim s as string = _dictionary(key).ToString() One of the nice things about using .ToString on an object reference is when working with a db. You know the column is char or varchar, but if it is nullable, the underlying type could be a DBNULL or string. Calling .ToString() on a DBNULL returns "", which is an acceptable response in most situations. Thanks, Eric Marvets MVP - Visual Developer, Security |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Let's say I have a dictionary where all the values are strings. Does anyone know if it is faster to say: dim s as string = directcast(_dictionary(key), string) or dim s as string = _dictionary(key).ToString() |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |