Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return variable type at runtime?????????
Message
 
To
30/03/2004 13:17:54
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00890850
Message ID:
00890916
Views:
24
It may be of interest to read the response I got regarding comparing control types and the very small related thread.

I think this is a good example of using the response from variable.gettype
but in summary, the example corrected code is something like:-
        For Each ctrl As Control In Me.Controls
            If TypeOf ctrl Is System.Windows.Forms.Button Then
                Console.WriteLine("test   " & ctrl.GetType.ToString)
                ctrl.BackColor = Color.FromName("red")
            End If
        Next
John T Barton
A single picture (or bit of code) is worth a thousand words
Previous
Reply
Map
View

Click here to load this message in the networking platform