C # Learning interface (write to yourself, no authority, welcome to correct)

Source: Internet
Author: User
Tags naming convention

Re-learn the three features of C #, found that the interface has not been used, are quick to forget, nonsense does not say, there is no code, mainly described to me to see (mainly online tutorials are W3, there is no colloquial description)

1, the interface is required instance, in use must be an instance

eg

Interface i_name{

public int add ();

}

This is an interface, the interface naming convention starts with I

Using interfaces

eg

Class Num:i_name

{

public int Add (int a, int b) {

return a + B;

}

public void Main () {

Add (3,4);

}

}

However, I have a problem, the interface uses the place exactly where, I hope you can say, developed for three months, no use to interface

C # Learning interface (write to yourself, no authority, welcome to correct)

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.