How can we mark an overloaded method obsolete?

I have two functions: Method(A val)and Method(B val), one of which takes valtype A, and the other of type B.

I want to point Method(A val)out outdated, so the IDE can highlight the fact that it is deprecated.

I decorated the method [Obsolete], but I do not consider it obsolete.

Am I missing something? From my research, I only saw examples of creating a completely new method to replace the old one, but I did not see any example of an overloaded function that takes place as deprecated. Any help would be greatly appreciated.

+4
source share
2 answers

Intellisense ; , , .

Intellisense popup:

enter image description here

:

enter image description here

, , , ( ):

enter image description here

- :

enter image description here

+7

"Servy" , intellisense, - , , , . EditorBrowsable, (intellisense).

0

Source: https://habr.com/ru/post/1535951/


All Articles