Hi i\'m working in a class library using C#, and i have some classes with some properties.
I just wanna know if i can add something to exclude some properties form t
Although I prefer, and am going to use, the attribute way, I did get this working in a different way that might help the OP.
Here's an example:
PropertyInfo[] properties = record.GetType().GetProperties().Where(p => !"Description".Equals(p.Name)).ToArray();
This will exclude any properties that are named "Description". If you're not able to change the class that contains the properties this could be an option. Again, I prefer the attribute way mentioned above.