posts - 50, comments - 154, trackbacks - 169

My Links

News

Tag Cloud

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

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: