Explain the Scope of
public/private/friend/protected/protected friend.



Explain the Scope of public/private/friend/protected/protected friend...

Answer / jiten

public members r available all classs
private members r available only within class
protcted members r available drive classs
protected friend members r availble in drived classs and
all classs whitch r in same assambly
friend memebers r available for all classs witch in same
assambly

Is This Answer Correct ?    13 Yes 1 No

Post New Answer

More C Sharp Interview Questions

Why abstract class can not be instantiated?

0 Answers  


What is the difference between constant and readonly in c#?

0 Answers  


7. C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

2 Answers  


What are the Types of configuration files and their differences

0 Answers   BirlaSoft,


Explain the functionalities of satellite assembly?

0 Answers   Siebel,






What is the main usage of keyword “virtual” ? How does it work for a method or property?

0 Answers   Siebel,


What is the difference between readonly and const

4 Answers   Emphasis,


What is concrete class in c# with example?

0 Answers  


What is the difference between abstract and virtual?

0 Answers  


What is cts, clr?

0 Answers  


If we inherit a class do the private variables also get inherited ?

2 Answers   TCS,


What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?

0 Answers  


Categories