What is Interface in C# and how to use it?

Posted by MohdSohail on Dec 4, 2020 7:53 PM EDT
codingfornoob.com; By Mohd Nadeem
Mail this story
Print this story

An Interface in C# is a contract between Interface and class that implements it. This contract says any class that implements this interface will provide the implementation for the members of the Interface. Unlike, Abstract class, Interface in C# can only contain declaration not implementation. Because all the members of the Interface are abstract and cannot have an implementation. The keyword abstract will not be used with the members of the Interfaces but the compiler will treat them as abstract members.

Just like Abstract and other special classes, Interfaces also come with some rules. Lets discuss those rules now.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Developer

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.