Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I cast a string into an Object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00832051
Message ID:
00834040
Vues:
18
Sorry to get back on this but I just tried this code:
Label x = new Label();
this.GetType().GetProperty("label1").GetValue(this,null);
MessageBox.Show(x.Text);
but I received the 'System.NullReferenceException' exception. Any ideas?


>>HI Rick.
>>
>>Do you know if it is working using Windows forms too?
>
>Sure. Reflection works on any type.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform