ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Microsoft Related >> C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1444)
 VB.NET interview questions  VB.NET Interview Questions (151)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
Question
Can you override private virtual methods?
 Question Submitted By :: C-Sharp
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
No, moreover, you cannot access private methods in
inherited classes, have to be protected in the base class to
allow any sort of access.
 
Is This Answer Correct ?    27 Yes 6 No
Umesh
 
Answer
# 2
WE can not use private access modifier for VIRTUAL,INTERFACE
and also we can not inherit private methods or properties
in inherited classes.
 
Is This Answer Correct ?    14 Yes 2 No
Payal Mehta
 
 
 
Answer
# 3
we should not use Private Access Specefier for
VIRTUAL ,ABSTRACT ,INTERFACES
 
Is This Answer Correct ?    14 Yes 4 No
Suresh.gv
 
Answer
# 4
No

virtual or abstract members cannot be private
 
Is This Answer Correct ?    11 Yes 3 No
Kiran
 
Answer
# 5
no 
Is This Answer Correct ?    10 Yes 4 No
Pk
 
Answer
# 6
we cant use private access modifier for VIRTUAL, INTERFACE
and ABSTRACT
 
Is This Answer Correct ?    7 Yes 2 No
Asim Bukhari
 
Answer
# 7
No. 
Is This Answer Correct ?    1 Yes 0 No
Faisal
 
Answer
# 8
virtual or abstract members cannot be private.

Ex: error occurs during the static compilation phase, which
means that no program that declares a private virtual method
will ever be executed in any way.
C#
class A
{
private virtual int Test()
{
return 1;
}
}

class Program
{
static void Main()
{
}
}

Compile-time error

Error 1
'A.Test()': virtual or abstract members cannot be private
 
Is This Answer Correct ?    0 Yes 0 No
Vivek
 
Answer
# 9
yes 
Is This Answer Correct ?    12 Yes 16 No
Bk Sahoo
 
Answer
# 10
first let me know wht is the benfit specifying virtual
method as private.
 
Is This Answer Correct ?    4 Yes 11 No
Prashanth
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
Which is the best way for keeping the data in XML or SQL server..and why? Infosys 8
C# Code for How to set readonly property to Id(database) value? HCL 2
How can we Achieve Late binding in C#.Can any give one example. Value-Labs 5
What?s the .NET datatype that allows the retrieval of data by a unique key?   1
how to retrieve binary data from database (using c#.net and sql server/windows application) Soltius 2
Explain ACID rule of thumb for transactions.   1
For a combobox and a listbox same datatable given as a datasource. Now problem is that whenever focus of listbox changes selected value of combobox also get change or vice versa. what to be done to avoid this. According to requirement we cannot make different datasouce. Syntel 2
int i,string s, String s1 Which is valuetype which is refrence type. Synechron 6
Which layer executed first among these Application layer,Buisness layer or Data Base Layer? L&T 2
If I have code like try { return; } catch { return; } finally { return; } from which block will the value will be returned. and try has been executed without any error. Cap-Gemini 6
wt is namespace? wt is the use?   12
How do you create multiple inheritance in C#? Microsoft 5
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com