Hi I am using reflection and I need to get the properties out of my type
But I only want to get the properties that have both Get and Set Accessors.
How can I accomplish that using the BindingFlags enum?
Here is my code:
This does not quite work. I need to go inside the second loop only if the specific Property has both Get and Set.Code:foreach (Type type in assembly.GetTypes()) { foreach (PropertyInfo propInfo in type.GetProperties(BindingFlags.SetProperty | BindingFlags.GetProperty)) { //do some stuff here. } }
Thanks very much in advance
Susan




Reply With Quote