Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return variable type at runtime?????????
Message
 
À
30/03/2004 13:17:54
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00890850
Message ID:
00890916
Vues:
23
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform