R
RobinS
So what you're saying is the "as operator" is like the TryCast command in
VB? If it can't cast it, it returns (null in C#, nothing in VB) ?
Robin S.
-------------------------
VB? If it can't cast it, it returns (null in C#, nothing in VB) ?
Robin S.
-------------------------
Göran Andersson said:As you are unable to read the documentation yourself, I will explain it
to you.
The DirectCast will attempt to make a cast, and throw an exception if it
fails.
The as operator will attempt to make a cast, and returns null it it
fails.
Do you now see the difference, or is there still something that is
unclear to you?