The member body has no code, and therefore it will not do anything when the code executes. Although having empty member bodies has no effect on code execution, you should examine all empty members for the following potential issues:
1. The empty member could contain commented out code that you actually need. For example, the following code sample shows a subroutine where an essential line of code has been commented out (possibly for development or debugging purposes):
' VB
Sub DeleteLockFile
' Be sure to delete the lock file before exiting
' the application, or it won't ever start again.
' System.IO.File.Delete("LockFile.dat")
End Sub
// C#
public static void DeleteLockFile()
{
// Be sure to delete the lock file before exiting
// the application, or it won't ever start again.
// System.IO.File.Delete("LockFile.dat");
}
' VB
Function ValidateCustomer() As Boolean
' TODO: very important - implement this before we deploy
End Function
// C#
public static bool ValidateCustomer()
{
// TODO: very important - implement this before we deploy
return true;
}