Need to make class property obsolete so developers will not use it.
Solution
Set property to "obsolete" in code to cause a compile warning or error:
[System.Obsolete("Deprecated: Don't use OldWay; use NewWay instead", true)]References
public string Xxx
{
get
set
}
"Obsolete (C#)." MSDN: Microsoft Development, MSDN Subscriptions, Resources, and More. 18 Feb. 2009
http://msdn.microsoft.com/en-us/library/22kk2b44(VS.80).aspx.
No comments:
Post a Comment