.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

which of the following statements is not true for interfaces

A) Interface definitions does not have implementation
B) Interfaces must be declared as public
C) Interfaces can be instantiated
D) Interface does not have constructors

Posted By :Gowthammanju     Posted Date :June 28, 2011    Points :40   Category :.NET Framework 
Explanation: Interfaces can only be implemented by inheriting and they can not be instantiated

You can also find related Interview Question to which of the following statements is not true for interfaces A) Interface definitions does not have implementation B) Interfaces must be declared as public C) Interfaces can be instantiated D) Interface does not have constructors  below: 

What is the differences between delegates and interfaces?

  
Interfaces carry semantics, and when a programmer implements an interface, he is typically well aware of that semantics. When you try to invoke a particular method via an interface, you can be fairly certain that if you succeed, the semantics of that method is what you expect. For that reason, using interfaces is essentially doing a check for semantic correctness on some level.


Delegates, on the other hand, by only verifying the method signature, make the programmer responsible for ensuring that the semantics of the method is compatible. The semantics may cover not only the meaning of the arguments and return value (some times even the order of the arguments if they are of the same type), the ranges of the arguments, but also an invocation order when multiple methods are concerned. Hence, in a sufficiently large program there is plenty of margin to make an error when different programmers are not forced to comply with a uniform semantics (as they would be if interfaces were used). (More...)

can we impliment multiple inheritance by using interfaces in C#.net?

  
yes we can implement:

Inheritance Usage Example:
Here is a syntax example for using Implementation Inheritance.


Class derivedClass:baseClass
{
}

derivedClass is derived from baseClass.

Interface Inheritance example:
private Class derivedClass:baseClass , InterfaceX , InterfaceY ....
{
}

(More...)

What is implementation inheritance and interface inheritance?

  
. When a class is derived from another class in such a way that it will inherit all its members to its corresponding derived class, then it is implementation inheritance.

. When a class inherits only the signatures of the functions from its corresponding base class, then it is interface inheritance. (More...)

What is the difference between abstract class and interfaces?

  
1) Concrete methods are applicable to abstract class only, interface cannot use them.

2)Abstract class uses inheritance while interface does not use inheritance. (More...)

Does accessibilty modifier implies on interfaces?

  
No, all the elements of interface should be public (More...)

Define Interfaces

  
properties and methods of classes, but unlike classes, do not provide implementations. The Interface statement allows you to declare interfaces, while the Implements statement lets you write code that puts the items described in the interface into practice.
(More...)

Which Interfaces do you need to implement in a disassembling custom pipeline component

  
A disassembling pipeline component receives one message on input and produces zero or more messages on output. Disassembling components are used to split interchanges of messages into individual documents. Disassembler components must implement the following interfaces:

IBaseComponent.
IDisassemblerComponent.
IComponentUI.
IPersistPropertyBag. (More...)

Is the below code correct :- [ServiceContract] interface IMyContract { [OperationContract(IsOneWay = true)] int MyMethod( ); }

  
No, there should be no reply associated with a one-way operation. In the above an integer value is returned even though the IsOneWay property is true ! (More...)

What is the difference between interface and abstract class ?

  
a class may inherit several interfaces, a class may inherit only one abstract class (More...)

What is difference between interface inheritance and class inheritance?

  
We can only inherit from one class but multiple interfaces. In addition, an interface does not contain any implementation it just contains a series of signatures. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend