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  >  Interview Questions  >  Microsoft  >  C#
Go To First  |  Previous Question  |  Next Question 
 C#  |  Question 420 of 431    Print  
Classes Interface
Explain how many classes can an interface inherit?


  
Total Answers and Comments: 2 Last Update: May 22, 2008     Asked by: dlogsdon 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Namedm
 
Interface cannot inherit classes.
Interfaces are used to define the methods and properties and the implementation is provided in the class that inherites interface

Above answer was rated as good by the following members:
WYATTEARP6
April 18, 2008 13:48:01   #1  
samalprakash83 Member Since: February 2008   Contribution: 1    

RE: Classes Interface

an interface can not be inherited from a class......

for further info contact +91-9986644137


 
Is this answer useful? Yes | No
May 22, 2008 03:14:39   #2  
Namedm Member Since: April 2007   Contribution: 7    

RE: Classes Interface
Interface cannot inherit classes.
Interfaces are used to define the methods and properties and the implementation is provided in the class that inherites interface

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

No. C# does not have macros. Keep in mind that what some of the predefined C macros (for example, __LINE__ and __FILE__) give you can also be found in .NET classes like System.Diagnostics (for example, 
Latest Answer : Ans:No ...

From language spec:The list of similarities between classes and structs is as follows. Longstructs can implement interfaces and can have the same kinds of members as classes. Structs differ from classes 
Latest Answer : Following are the main points of difference between classes and structs in C#:Value type vs Reference type: Structs are value type and classes are reference type. Whenever a struct object is assigned to another struct object a copy is created. In case ...

Casting the char to an int will give you the ASCII value: char c = 'f';System.Console.WriteLine((int)c);or for a character in a string: System.Console.WriteLine((int)s[3]);The base class libraries 
Latest Answer : Ans:// Create an ASCII encoding.            Encoding ascii = Encoding.ASCII;The base class libraries also offer ways to do this with the Convert class or Encoding classes if you need a particular ...

From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
With regard to versioning, interfaces are less flexible than classes. With a class, you can ship version 1 and then, in version 2, decide to add another method. As long as the method is not abstract (i.e., 

Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?
There is no way to restrict to a namespace. Namespaces are never units of protection. But if you're using assemblies, you can use the 'internal' access modifier to restrict access to only 

By using the Registry and RegistryKey classes in Microsoft.Win32, you can easily access the registry. The following is a sample that reads a key and displays its value: using System;using Microsoft.Win32;class 
Latest Answer : Ans:By using the Registry and RegistryKey classes in Microsoft.Win32 ...

Classes in the same namespace.  
Latest Answer : Namespaces is not correct - The protected modifier allows the field to be accessed only by the inherting class and the base class. If you were to put the modifier 'protected internal' then the field can be accessed by inheriting classes and also by classes ...

It is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in).  
Latest Answer : Ans:protected internal is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in). function checkf(form) { var f = document.form1;if (document.form1.cmt.value=='') { alert('Please enter ...

No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.  
Latest Answer : Yes samikcs is correct we cannot declare a method as 'private virtual'.Virtual is used to ovveride this method  in the  derived  class. ...

Yes, that is what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It is the same 
Latest Answer : can be done by using the keyword "not inhertitable "syntax is not inheritable class '''''''''''''''codeend class ...


 Sponsored Links

 
Related Articles

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

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
 

Microsoft AJAX Library - C# and JavaScript Classes

C and JavaScript Classes For the purpose of demonstrating a few more OOP related concepts we ll use another class Our new class is named Table and it has two public fields rows columns and one method getCellCount The getCellCount method should return the number of rows multiplied by the number of co
 

Microsoft AJAX Library - JavaScript Classes

JavaScript Classes Not only can JavaScript functions contain other functions but they can also be instantiated This makes JavaScript functions a good candidate for implementing the concept of a class from traditional object oriented programming This is very helpful feature indeed because JavaScript
 

C++ Storage Classes

C Storage Classes In this C tutorial you will learn about storage classes types of storage class variables Automatic External and Static explained with examples mosgoogle center Storage classes In the context of scope of variables in functions exists the important concept of storage class What is St
 

C++ Objects and Classes

C Objects and Classes An Overview about Objects and Classes In object oriented programming language C the data and functions procedures to manipulate the data are bundled together as a self contained unit called an object A class is an extended concept similar to that of structure in C programming l
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 





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