Can we have a non static member function in a base class to
be override in derived with static modifier?
Answer Posted / siva
No We cannot Create. It shows an error.
A static member 'Analysis.Class3.ss1()' cannot be marked as
override, virtual, or abstract
class Class2
{
public Class2()
{
}
public virtual void ss1()
{
System.Windows.Forms.MessageBox.Show("Base :
ss1");
}
}
class Class3:Class2
{
public Class3()
{
}
public static override void ss1()
{
System.Windows.Forms.MessageBox.Show
("Derived:s1");
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is difference between singleordefault and firstordefault?
What is assembly manifest?
What is a property c#?
What is reference c#?
How does dll hell solve in .net?
How many bytes is an int in c#?
What is a console in c#?
Which language is used for desktop application?
What are the fundamental principles of oo programming?
Can a struct inherit from another struct or class in c#?
Explain the security with aop?
Why abstract class is not instantiated in c#?
What are collections in c#?
What does the parsefloat function do?
What is get set in c#?