|
-
Aug 21st, 2003, 02:16 PM
#1
Thread Starter
Hyperactive Member
The Difference is bewtween....
Since I have option strict on in all my work, I find that I'm converting and casting constatly because of it. Pulling data out of a datareader, whats the diference between these two??
VB Code:
'Should I do it this way??
Acct.AcctPass = CStr(r("AcctPass"))
'Or this way??
Acct.AcctPass = CType(r("AcctPass"), String)
-
Aug 21st, 2003, 02:35 PM
#2
CStr is part of the Visual Basic namespace and is a port of the VB6 function instead of a native .NET version that does the same thing like CType. (I think)
-
Aug 21st, 2003, 02:37 PM
#3
Thread Starter
Hyperactive Member
Originally posted by Edneeis
CStr is part of the Visual Basic namespace and is a port of the VB6 function instead of a native .NET version that does the same thing like CType. (I think)
Thx Edneeis...
-
Aug 21st, 2003, 02:49 PM
#4
Sleep mode
Originally posted by Edneeis
CStr is part of the Visual Basic namespace and is a port of the VB6 function instead of a native .NET version that does the same thing like CType. (I think)
.It's one of the .Net Framework functions .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|