Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
How do you invoke a method in a abstract class without inheriting the class?
Posted 6-Dec-12 20:04pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
AnkitGoel.com at 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 at 13-Jan-14 19:10pm
   
Actually, his answer is just fine.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

We can only invoke static methods of an abstract class without sub classing it.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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();
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 13 Jan 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid