Replies: 1 comment
-
|
This is a good recommendation currently I suggested to make backup of the method with _Backup string.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a situation where we are told to change a certain functionality within a function
it would be a great practice to make the previous methods Obsolete by adding the 'Obsolete' attribute on them
and writing a new method
Instead of commenting out functionality within the old method and writing new functionality.
This will help keep track of all the previous functionalities. and keep them alive incase we are told to revert back to old functionality
eg:
[Obsolete("This method is obsolete, Please use TogglePanel(bool value)")]
public void ClosePanel() {
}
[Obsolete("This method is obsolete, Please use TogglePanel(bool value)")]
public void OpenPanel(){
}
//New method
public void TogglePanel(bool value){
}
Beta Was this translation helpful? Give feedback.
All reactions