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...


Can you override private virtual methods?

Answers were Sorted based on User's Feedback



Can you override private virtual methods?..

Answer / umesh

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 ?    28 Yes 6 No

Can you override private virtual methods?..

Answer / payal mehta

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

Can you override private virtual methods?..

Answer / suresh.gv

we should not use Private Access Specefier for
VIRTUAL ,ABSTRACT ,INTERFACES

Is This Answer Correct ?    14 Yes 4 No

Can you override private virtual methods?..

Answer / kiran

No

virtual or abstract members cannot be private

Is This Answer Correct ?    11 Yes 3 No

Can you override private virtual methods?..

Answer / pk

no

Is This Answer Correct ?    10 Yes 4 No

Can you override private virtual methods?..

Answer / asim bukhari

we cant use private access modifier for VIRTUAL, INTERFACE
and ABSTRACT

Is This Answer Correct ?    7 Yes 2 No

Can you override private virtual methods?..

Answer / faisal

No.

Is This Answer Correct ?    1 Yes 0 No

Can you override private virtual methods?..

Answer / vivek

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

Can you override private virtual methods?..

Answer / kirti

No. Private methods are not accessible outside the class.

Is This Answer Correct ?    0 Yes 0 No

Can you override private virtual methods?..

Answer / bk sahoo

yes

Is This Answer Correct ?    12 Yes 16 No

Post New Answer

More C Sharp Interview Questions

How do I create a multi language, multi file assembly?

0 Answers  


I want to single value if you give any integer value. Below are examples  1. Input: 123  Output: 6 2. Input: 99   9+9=18   1+8  Output: 9 How to get above output?

1 Answers   AxSys,


What's the difference between an integer and int?

0 Answers  


How are Windows programs different from normal C-programs?

0 Answers   Tech Mahindra,


How to create multi-dimensional array?

0 Answers   C DAC, CDAC,


update data in an xml file which resides in solution itself, using silverlight 4.0

0 Answers  


Explain deadlock?

0 Answers  


What is datagrid c#?

0 Answers  


What is regex c#?

0 Answers  


Can you put two constructor with the same structure in a class?

0 Answers  


What is a console in c#?

0 Answers  


Explain acid rule of thumb for transactions in c#.

0 Answers  


Categories