Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for existence
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00924170
Message ID:
00924210
Vues:
10
This message has been marked as the solution to the initial question of the thread.
You need to use Reflection. Here's an example that checks for properties of a Button control.
using System.Reflection;
...
PropertyInfo pi;
pi = button1.GetType().GetProperty("Text");
MessageBox.Show(pi == null ? "Property does not exist." : "Property exists.");
pi = button1.GetType().GetProperty("Foo");
MessageBox.Show(pi == null ? "Property does not exist." : "Property exists.");
---
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
http://www.msmvps.com/windsor
http://www.g6consulting.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform