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

Explain the concept of destructor, Explain the concept of destructor? A...

Explain the concept of destructor? A destructor is a special method for a class and is requested automatically when an object is finally destroyed. The name of the destructor i

I need kinect fitting room - smart fitting mirror, I need Kinect Fitting Ro...

I need Kinect Fitting Room - Smart Fitting Mirror I'm presently looking for someone able to create software exactly like this fitnect (Kinect Fitting Room). Software can work

Explain the wsdl, Explain the WSDL. WSDL is a short form for Web Servi...

Explain the WSDL. WSDL is a short form for Web Services Description Language, which is used to explain a Web service in terms of the messages that it forms and accepts. The WS

What is a gateway, What is a gateway or Router? A node that is linked t...

What is a gateway or Router? A node that is linked to two or more networks is commonly called as router or Gateway. It generally forwards message from single network to another

Mention the execution process for managed code, Mention the execution proce...

Mention the execution process for managed code. A piece of managed code is executed as follows:     Choosing a language compiler     Compiling the code to MSIL     Com

Candidate key, What is a candidate key? A table may have more than one ...

What is a candidate key? A table may have more than one combination of columns that could uniquely identify the rows in a table; every combination is a candidate key. During th

Difference between thread and process, What is the difference between threa...

What is the difference between thread and process? The thread is a path of execution which can run on CPU; a process is a collection of threads that share the same virtual memo

Dataset object, What is Dataset object ? The DataSet gives the basis fo...

What is Dataset object ? The DataSet gives the basis for the disconnected storage and manipulation of the relational data. We fill it from the  data store, work with it while d

What is adrotator scheduler, Question: (a) List and describe the four ...

Question: (a) List and describe the four parameters contained in the second section of the AdRotator Scheduler File. (b) Distinguish between the following types of "Locks"

Converting $ into rs. - c# program, Converting $ into Rs.  - C# Program ...

Converting $ into Rs.  - C# Program I am a learner of C# language and i am struggling with how to convert $ into Rs. in C#. Can you have any code examples for this?

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