Interface, DOT NET Programming

Assignment Help:

What is a Interface?

The Interface is a contract that describes the signature of the functionality. So when a class is implementing a interface it says to the outer world, that it provides specific behavior. For example if a class is implementing Idisposable interface which means it has a functionality to release unmanaged resources. Now all the external objects using this class know that it has contract by which it can dispose unused unmanaged objects.

1.     The Single Class can implement multiple interfaces.

2.     If a class implements the interface then it has to provide implementation to all its methods.

In the sample there are 2 files. One has the definition of interface and other class implements the interface. Below is the source code "IInterface" is the interface and "ClsDosomething" implements the "IInterface". The  sample just displays a simple message box.

Public Interface IInterFace

 Sub DoSomething()

 End Interface

 Public Class ClsDoSomething

Implements IInterFace

 Public Sub DoSomething() Implements WindowsInterFace.IInterFace.DoSomething MsgBox("Interface implemented") End Sub

 End Class

38_Interface.png

Figure:-Interface in action


Related Discussions:- Interface

Windows phone 8 camera streaming to desktop app, Windows Phone 8 camera str...

Windows Phone 8 camera streaming to desktop app Project Description: I require WP8 application (client) that will: 1. Automatically evaluate and connect to Windows desktop

Define importance of vitamin c, Define importance of Vitamin c Freezing...

Define importance of Vitamin c Freezing preserves vegetable and nutrients to a great extent. Vitamin A and β-Carotene are well preserved in spinach, peas and beans, or are mode

Set up a ftp file server and active ftp file transfer, Set up a FTP File Se...

Set up a FTP File Server and active FTP File Transfer using VB.NET The Job Description is as given: 1. Manually set up a FTP file server on a remote server. 2. Manually ad

Describe the disconnected architecture of ado.net, Describe the disconnecte...

Describe the disconnected architecture of ADO.NET's data access model. ADO.NET maintains a disconnected database access model, which means, the application never remains linked

Decision making and branching - c# program, Decision Making and Branching -...

Decision Making and Branching - C# Program Need Programming help on Decision Making and Branching in C#.

Explain nutritional properties of processing food, Nutritional properties o...

Nutritional properties of Processing food Processing food, you may have realized that many desirable changes occur, which include development of pleasing colours and flavors, i

Need vb.net windows application programmer, We need vb.net windows applicat...

We need vb.net windows application programmer with min six years exp to work on our email marketing project Project Description: We need a windows application vb.net programm

Develop skype recorder application, Develop Skype Recorder Application + Se...

Develop Skype Recorder Application + Setup + Sourcecode + NICE UI Project Description: i need an application built which will allow user to record skype audio or video calls

Classic ado and ado.net , What are major difference between classic ADO and...

What are major difference between classic ADO and ADO.NET ? Some major differences between the classic ADO & ADO.NET are as follows: 1) As in the classic ADO we had server a

Vb 2010, how to create log in form using vb 2010

how to create log in form using vb 2010

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd