Mark a method as obsolete

If you have legacy code, or you have some other old code you want to rewrite, but donโ€™t have the possibility to erase the old methods yet, you could mark them as obsolete methods.

Stackoverflow answer

Source: stackoverflow

1
[Obsolete("Method is deprecated, please use <Namespace>.<Methodname> instead.")]