GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  Programming  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 8 of 40    Print  
Interface contains the declaration of methods only and we can declare this method
also inside our own class.So what is the need once declare a method inside the interface and then implement it into a class?

  
Total Answers and Comments: 1 Last Update: February 16, 2007     Asked by: amitdwi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 09, 2007 05:07:10   #1  
thakurshiv        

RE: Interface contains the declaration of methods only...
Interface is a contract to your follower of the interface. So if anyone want to implement your iterface he has to follow your method with the same signature nothing else.But main use of interface one can see when client acessing your interface, in respect of versioning, because if one change or addition the method name of the interface one has to update this into the client part as well.
 
Is this answer useful? Yes | No

 Related Questions

I have a class with constructor, if i throw an error inside the constructor what will become the object while initializing
Read Answers (1) | Asked by : Febin

Interface contains the declaration of methods only and we can declare this method also inside our own class.So what is the need once declare a method inside the interface and then implement it into a class?
Read Answers (1) | Asked by : amitdwi

In the code below which constructor will get fired first?Public Class Class1Sub New()End SubEnd ClassPublic Class class2Inherits Class1Sub New()End SubEnd Class
Read Answers (1) | Asked by : pam

Does an abstract class can contain sealed methods? Can we create an abstract class without abstract methods?
Read Answers (1) | Asked by : Vijay
Tags : Abstract

I took a button in form.I have two classes emp and bonus.bonus class is inherited from emp class.If bonus is giving ie in dialog box if we select ‘Yes’ b ie bonus 
Latest Answer : Hi aarruunnaa,You try this code, if it is useful for you send me reply otherwise ask me again dont hesitate class emp {public int eno,sal; public emp(){}public emp(int eno,int sal) {this.eno=eno;this.sal=sal; }public virtual void print() {MessageBox.Show("eno ...


 Sponsored Links

 
Related Articles

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

High-Speed Serial Interface (HSSI)

High Speed Serial Interface HSSI HSSI is High Speed Serial Interface was first developed by Cisco systems and the main purpose was to solve high speed requirement issues The main application of HSSI is on the Wide Area Networks and it helps to enhance the data flow speed on these networks It can wor
 

Fiber Distributed Data Interface (FDDI)

Fiber Distributed Data Interface FDDI The Fiber Distributed data interface or the FDDI is a 100 mbps line using the LAN network and is connected through a fiber optic cable The FDDI technology is used where the networks need a high speed bandwidth and need to cover huge distances than the copper wir
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Pure Virtual Function and Base Class

C Pure Virtual Function and Virtual Base Class In this C tutorial you will learn about pure virtual function declaration of pure virtual function and virtual base class virtual base class and how to implement a virtual base class explained with examples mosgoogle center What is Pure Virtual Function
 

How to Access C++ Class Members

How to Access C Class Members In this C tutorial you will learn how to access Class members dot operator or class member access operator difference between struct and class and  scope resolution operator mosgoogle center It is possible to access the class members after a class is defined an
 

What is Common Data Modeling Method

Common Data Modeling is one of the core considerations when setting up a business data warehouse. Any serious company wanting to have a data warehouse will have to be first serious about data models. Building a data model takes time and it is not unusual for companies to spend two to five years just
 

Assign values during declaration

How to assign values during declaration of variables Declaring variables tells the compiler the data type the variable is assigned and no storage area is allocated during this stage. It is possible to assign values during declaration itself. For example, consider the following program: main() {
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape