Re: How to determine read/write status of a property
Brady Kelly <[email protected]> Mon, 25 Feb 2008 18:19:35 +0200
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
> How do I discover if a property is read only or read/write at runtime
> (other than trying to write to it)?
Get a PropertyInfo object using Reflection and check its CanWrite property.
To get the PropertyInfo, use
PropertyOwner.GetType().GetProperty("PropertyName").
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com