Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for existence
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00924170
Message ID:
00924210
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform