Braintique.com header
Left Navigation Bar

Adding the Interface to the Class

Now that the interface has been specified, a class can be instructed to implement it in its declaration in the inheritance clause. Since classes can implement multiple interfaces—compared to only being able to inherit from one class—the interface implementation is specified in a comma-delimited list. For example:

public class Dinosaur : IComparable, ICarnivore
{
...
}

As with the IComparable interface, if you run this code without placing the member required by ICarnivore in the class, you’ll get a syntax error.

Syntax

Previous Table of Contents Next


Google
 
Web www.braintique.com
www.digitalfieldguide.com www.googleplexblog.com


Home | Barticles | Blogs | Books | Services | FAQ | Contact

© Braintique.com. All rights reserved.

Search Engine Optimization







RSS 2.0 Syndication feed

Syndication Viewer

Our Web host:
IX WebHosting



Food for Your Brain! Get a Barticle! Questions Answered Books for You What We Can Do For You Contact Us Brain Food Questions Answered Books for You What We Can Do For You Frequently Asked Questions About Us Google Research Photoshop Wi-Fi and Wireless Networking The Natural Way to Write