Learning of C # abstract classes and their methods

Source: Internet
Author: User

Http://www.cnblogs.com/flyinthesky/archive/2008/06/18/1224774.html

Use the keyword abstract in C # to define abstract classes and abstract methods.

Classes that cannot be initialized are called abstract classes, and they provide only partial implementations, but another class can inherit it and create them
The instance.

"A class that contains one or more pure virtual functions is called an abstract class, and abstract classes cannot be instantiated, further
An abstract class can only be used by interfaces and as base classes of other classes. " -C + + programming Language by Stroustrup Chapter13.2

Abstract classes can be used for classes, methods, properties, indexers, and events, using abstract in a class declaration to indicate that the class tends to be a base class for other classes
Members are marked as abstract, or are included in an abstract class and must be implemented by their derived classes.

Learning of C # abstract classes and their methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.