Example analysis of the difference between static and dynamic method invocation in ES0en. net
- 2020-06-15 08:00:28
- OfStack
// Defining static methods
class SQLHelper
{
public static string aaa()
{
return "Hello "
}
}
Call:
SQLHelper.aaa(); // The name of the class . The method name
// Defining dynamic methods
class SQLHelper
{
public string aaa()
{
return "Hello "
}
}
Call:
SQLHelper s =new SQLHelper ();
s.aaa();