Hi,
I'm trying to recognise whether a function is deprecated or not when
reflecting a method.
eg.
[Obsolete ("This function will error",true)]
or
[Obsolete]
Am I right in saying that the attributes value
(System.Reflect ion.MethodAttri butes) is 6278? - is this a safe assumption?,
I guess the value could vary which is why I'm a bit worried.
I've been looking through the example on MSDN
http://msdn.microsoft.com/library/de...classtopic.asp
and created a sample app, but there doesn't look to be any difference. Is
there any way of telling via reflection that the obsolete method has the
true parameter?
Many thanks
Rich
Using the sample on MSDN, and reflecting an assembly with these two methods
[Obsolete ("This function will error",true)]
public string UsingDeprecated Function(string aString)
{
}
public string UsingaNormalFun ction(string aString)
{
}
The results are
UsingDeprecated Function
(System.String aString)
Attributes :
PrivateScope
FamANDAssem
Family
Public
HideBySig
ReuseSlot
UsingaNormalFun ction
(System.String aString)
Attributes :
PrivateScope
FamANDAssem
Family
Public
HideBySig
ReuseSlot