2012年5月10日 星期四

[Windows] Depreciated in C#

To set a function in .net as depreciated, we can use code like this


        [Obsolete("Reason of depreciate.")]
        public void Your_Function(int parameters)
        {
            Your_Code_Here;
        }
After that, when you reference this function, it will shows as depreciated, and will have a warning saying your call is obsolete.

沒有留言:

張貼留言