Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How do you invoke a method in a abstract class without inheriting the class?
Posted

 
Share this answer
 
Comments
AnkitGoel.com 7-Dec-12 13:16pm    
it would be good if u explain here rather than posting a link and letting others waste their time reading a long article.
Dave Kreskowiak 13-Jan-14 19:10pm    
Actually, his answer is just fine.
We can only invoke static methods of an abstract class without sub classing it.
 
Share this answer
 
You can invoke it by using static modifier for your method

ex:
abstract A
{
public void G()
{
// code
}

}

then you can call it like so :
A.G();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900