Explain About a class access specifiers and method access specifiers.
Answer / Aditya Kumar
Class access specifiers determine the visibility of a class within the code. There are four types of class access specifiers in C#:
1. Public: The class can be accessed from any other class or namespace.
2. Private: The class can only be accessed within the same namespace or file.
3. Protected: The class can only be accessed within the same namespace or by derived classes.
4. Internal: The class can only be accessed within the same assembly.nMethod access specifiers determine the visibility of a method within the code. There are four types of method access specifiers in C#:
1. Public: The method can be accessed from any other class or namespace.
2. Private: The method can only be accessed within the same class.
3. Protected: The method can only be accessed within the same class or by derived classes.
4. Internal: The method can only be accessed within the same assembly.
| Is This Answer Correct ? | 0 Yes | 0 No |
give suitable code for all login controls
Define Virtual folder?
Is there any way to access private memebers of an object from another object?
List down the fundamental oop concepts?
What is Implementation inheritance and interface inheritance?
Write a C# program to find the Factorial of n
Difference between C++ and C#.net
19 Answers Google, TCS, Wipro,
interface a { Method1() Method2() } class b: a { override Method1() override Method2() } what will happen & why?
What is binding in c#?
What Is The Smallest Unit Of Execution In .net?
What is a console file?
What is difference between ienumerable and list in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)