I know that using the Static method in an abstract class is not recommended, but what's the difference. If I use both static and non-stationary method in an abstract class.
I assume that there is no difference in calling these methods, because we cannot create an instance for an abstract class, so we can call both static and non-static methods using only the class name.
Is there any other difference between them besides the keyword "Static"?
Example: Abstract class:
abstract public class AbstractClass
{
#region Constructor
protected AbstractClass(Args args): this(args)
{
}
#endregion
#region public static methods
public static object FormLoad(Args args)
{
}
public static object Sample(Args args)
{
}
#endregion
#region Public non-static methods
public AbstractClass CreateResponse(Args args)
{
}
public void ClearDialog()
{
}
#endregion
#region Abstract Method
abstract protected void Responses();
#endregion
}
Derived class:
public class DerivedClass : AbstractClass
{
#region Public Constructors
public DerivedClass(Args args)
: base(args)
{
}
#endregion
#region Protected Methods
protected override void Responses()
{
}
#endregion
}
source
share