posts - 50, comments - 105, trackbacks - 346

My Links

News

Article Categories

Archives

Post Categories

Image Galleries

Friends Blog

Static Class - Abstract does not require inheritence for full implementation.

Here is good discussion on Static and abstract, Max has given this example in Ericqu comments section on static class blog.

@Talbott
abstract does _not require_ inheritance for a full implementation:

abstract class Foo
{
static void DoSomething(){}
}
...
Foo.DoSomething();

is totally legal code. 'abstract' only means no instance can be created - at least at the view of the Compiler/Runtime.
But I have to agree that most people think 'abstract' means an incomplete class. So it may be less confusing to introduce a "new" keyword instead.

http://weblogs.asp.net/ericgu/archive/2004/04/13/112274.aspx

Print | posted on Monday, April 19, 2004 7:21 AM | Filed Under [ C# ]

Feedback

Gravatar

# re: Static Class - Abstract does not require inheritence for full implementation.

Armor2net Personal Firewall software provides a complete spectrum of Internet security and Internet privacy for computers. The program protects the computer from hackers, data thieves, and other Internet-based dangers.
For more information, please visit: <a href=“http://www.armor2net.com”>http://www.armor2net.com</a>
8/18/2004 7:39 AM | Grant Brown

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 7 and 4 and type the answer here:

Powered by: