.net - Version-sensitive ObsoleteAttribute -


the [obsolete] attribute handy marking classes have been deprecated in favor of better implementations, isn't sensitive version of .net project targeting.

for example, i'm using home-rolled threadsafedictionary class versions of .net before 4.0. when .net 4.0 came out included new class called concurrentdictionary. i'd able mark threadsafedictionary [obsolete] only if project being compiled .net 4.0. doesn't appear stock obsoleteattribute supports controlling compiler's warnings framework version.

is there way this?

i guess roll out custom attribute , create post-build process examines compiled code through reflection searching attribute.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -