Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR
MULTIPLE INHERITANCE)

Answers were Sorted based on User's Feedback



WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)..

Answer / matt s

An interface definition specifies the 'intent' of a public
interface without forcing a base implementation. It's more
used (in favour of base or abstract classes) in cases where
the interface defines some common 'high level'
characteristics or concepts for completely different
implementations - e.g:

A 'dog' interface may be specified with common methods such
as 'scratch' and 'bark', but each type of dog's
implementation of those would be completely different.
It's still a useful design feature however as it recognises
there are similarities at the higher 'behaviour' level.

Is This Answer Correct ?    2 Yes 1 No

WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)..

Answer / guest

when classes follow same signature, then use interface.
Interfaces describes peripheral activities of objects.

Is This Answer Correct ?    2 Yes 1 No

WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)..

Answer / arvind nagar

Interface is mainly use to apply restrictions in accesing
the members.
For eg.-
using System;
Interface Sales
{
Void prediction();
}
Interface Hr
{
Void SalayInfo();
}
Class Abc:Sales,Hr
{
Public void Pediction()
{
x.WriteLine("Sales for 2008 will 2000 laptops");
}
Public void SalryInfo()
{
x.WriteLine("Salary is going to increment by 30%");
}
Public void Hello()
{
x.WriteLine("Hello frnds");
}
}
class test
{
public static void main()
{
Hr a= new Abc();
a.SalaryInfo();
}
}

O/p-- Salary is going to increment by 30%.
Suppose we wish to access the Hello() function, then we
can't access the a.Hello();--it gives error.
b'coz Hr doesn't contain a
definition of Hello.

Is This Answer Correct ?    0 Yes 0 No

WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)..

Answer / ashwani kumar

Interfaces are used to decouple the application means our
implementation and defination are diffrent so any change in
one layer dn't affect other
and
if we want to follow some designing pattern then we use
interface.

Is This Answer Correct ?    0 Yes 0 No

WHAT IS THE EXACT USE OF INTERFACE(DONT TELL USE FOR MULTIPLE INHERITANCE)..

Answer / kinge amol

if any future implimentation required so not implimentation
on class but is impliments in interface and inherites
interface form class

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Sharp Interview Questions

What are collections in c#?

0 Answers  


What is autopostback in c#?

0 Answers  


Explain the accessibility modifier protected internal?

0 Answers  


Which class does the remote object has to inherit?

0 Answers  


Can an Assembly have multiple versions

13 Answers   TCS,


Explain the difference between boxing and unboxing.

0 Answers   Accenture,


What is a method signature?

0 Answers  


how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

0 Answers   HCL, NIC,


Is array ienumerable c#?

0 Answers  


What is hashtable in c# net with example?

0 Answers  


Can we inherit abstract class in c#?

0 Answers  


C# called c sharp why?

0 Answers  


Categories