"Virtual properties behave like abstract methods" ?

  • Thread starter Thread starter Gert Kok
  • Start date Start date
Gert said:
The microsoft page http://msdn2.microsoft.com/en-us/library/9fkccyh4.aspx

states:

Remarks (nr 4)

Virtual properties behave like abstract methods, except for the
differences in declaration and invocation syntax.


Why is it "abstract methods", not "virtual methods" ?

I have to agree with Stoitcho that it is most likely a typo. Abstract
methods must be overridden in a derived class. Virtual properties do not
need to be overridden in derived classes. Abstract properties must be
overridden in derived classes.
 
I'm sure, it's only a typo.

The programmers reference often is much less exact than the specifications.

Here the quote from the specs:
Except for differences in declaration and invocation syntax, virtual,
sealed, override, and abstract accessors behave exactly like virtual,
sealed, override and abstract methods.
..
 
Yes,

And it is pretty obvious from the context of the article - its is about
*virtual* keyword not *abstract*.They have different article for
*abstract* - http://msdn2.microsoft.com/en-us/library/9fkccyh4.aspx .
In that article one can find exactly the same sentence

"Abstract properties behave like abstract methods, except for the
differences in declaration and invocation syntax."

It looks like more like Copy/Paste error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top