My blog has moved!

You should be automatically redirected in 6 seconds. If not, visit
http://www.f5todebug.wordpress.com
and update your bookmarks.

Tuesday, 5 February 2008

Determining data types at runtime in VB.Net


I always forget how this should work. So here its is quick and easy...

To determine the data type of an object at runtime you can use the TypeOf() function.

For example :
If TypeOf(Control) is TextBox Then
'Some function here
End If



No comments:

Post a Comment

Please leave a comment if you have found this post useful, or if there are any errors. I will do my best to assist if a posted solution does not help with your problem.