IFAIK, no - depreciated properties aren't changed in the class definition - they are depreciated via the documentation only.
There is however the
ObsoleteAttribute Attribute[
^] which you could pick up on via Reflection and display yourself. However, this does rely on the type being changed my MS to include the attribute - and that can't be guaranteed. Obviously, you need to use the "latest" version of the framework in order to check if a property is obsolete!
"Hi OriginalGriff,
Thanks for this, i have looked though the documentation and it is a useful resource for showing the currently deprecated properties dlls etc in .Net.
I have been trying to query the obsolete attribute using reflection but have not yet discovered a method of doing so and could not see anything which may lead me to this within the resource =s.
I suppose my original goal may seem odd but ideally i want to display depreciated,normal and non browsable properties in separate property grids. This is to allow testing of all attributes.
I just tried it quickly, and it's pretty simple:
Type t = typeof(MyClass);
foreach (System.Reflection.PropertyInfo p in t.GetProperties())
{
var x = p.GetCustomAttributes(false).ToDictionary(a => a.GetType().Name, a => a);
Console.WriteLine(p.Name);
foreach (string k in x.Keys)
{
Console.WriteLine(" " + x[k]);
if (x[k] is ObsoleteAttribute)
{
Console.WriteLine(" ****");
}
}
}