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
Is learning c# hard?
What are escape sequences explain with example?
Define strong name in c#?
What is int16?
Can we inherit sealed class in c#?
What is arraylist class in c#?
How does return work in c#?
Is list ienumerable c#?
Why use a singleton instead of static methods?
What is xml document how do you open it?
Why do we overload constructors?
Is a c# interface the same as a c++ abstract class?
What is strong name assembly?
What is an assembly qualified name? Is it a filename? How is it different?
What are the 3 elements of delegation?