I have two functions: Method(A val)
and Method(B val)
, one taking val
of type A
and the other of type B
.
I want to mark Method(A val)
obsolete, so that IDE can highlight the fact that it's obsolete.
I have decorated the method with [Obsolete]
, however, am not seeing it as deprecated.
Am I missing something? From my research, I have only seen examples of creating a brand new method to replace the old one but not seen any example of a overloaded function taking place of the older deprecated one. Any help would be highly appreciated.
Intellisense doesn't consider just a single overload depreciated; it considers an entire method deprecated in what it shows.
If we look at the entire method's Intellisense popup:
compared to the popup for a particular overload:
But the key point is that once we have a completed call to the method, the deprecated overload results in a warning (or error):
while the other does not:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With