C#?е?Obsolete????(Attribute)
???????????? ???????[ 2014/12/4 11:38:49 ] ????????C# ??????? NET
??????????£???????????θ???????????????????????????????????????????????????????????????????????Obsolete?????????÷??????????????????????????????????Obsolete???????????????
????Obsolete attributeλ??System??????????????attribute???????Obsolete????ObsoleteAttribute?????attribute???????????????????????????????? “Attribute” ?????
??????????attribute???÷?????[]Χ??????????attribute????????????ε?????????????????С?????????????????????Obsolete attribute??????????????0??1??2????????
???????
using System;
class Program
{
static void Main()
{
MethodA();
}
[Obsolete("Use MethodB instead")]
static void MethodA()
{
}
}
?????ó??????????????????????????? 1 “Program.MethodA()”????:“Use MethodB instead” ??
????????C#?е????????????????????????????Attributes??Obsolete attribute??????????????????????????????????????????????????????????????????????????????????????/???????????????????????????????????????true?????????????false???????????棩??
?????????в???汾????????obsolete attribute???????????????????????????μ???????????????????????????????????????????Obsolete attribute?????θ÷???????????????????/??????????????????????????????????????У???????Э???????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11