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
Distinguish between a class and struct?
What are the two uses of a ‘using’ statement in c#?
Explain about Error handling and how this is done
Can you prevent a class from being instantiated?
What are the Types of compatabilities and explain them
What are modifiers in c#?
Why we use extension methods in c#?
What do u mean by thread safe?
What issues can be faced while delivering code?
What is wpf application in c#?
Is it possible to nest cfml conditional tags?
What is escape character in c#?
Why do we use ienumerable in c#?
Is int reference type c#?
Can constructor have return type c#?