You are here:

C#/diff b/w specifier and modifier.

Advertisement


Question
QUESTION: Please give me the brief explanation of difference between access specifier and modifier with example.

ANSWER: Hi

Access specifiers
------------------------
 
1) The access specifier determines how accessible the field is  to code in other classes. Access ranges from totally  accessible to totally inaccessible. You can optionally  declare a field with an access specifier keyword: public, private, or protected.
 
2) private, or protected.
 
2) it will define scope
 
Access Modifiers
-----------------------
 
1) You can optionally declare a field with a modifier keyword:  
final or volatile and/or static and/or transient.
 
2) private,  protected or default.
 
3) It defines the behavior

Hope it helps.

Thanks

-Srini



---------- FOLLOW-UP ----------

QUESTION: are access modifiers and specifiers both same?

Answer
they are not  the same

Access specifiers: The access specifier determines how accessible the field is to code in other classes. Access ranges from totally accessible to totally inaccessible. You can optionally declare a field with an access specifier keyword: public, private, or protected.

Access Modifiers: You can optionally declare a field with a modifier keyword: final or volatile and/or static and/or transient, abstract, etc.  

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

can answer any kind of questions in ASP.NET, C#, VB.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2016 About.com. All rights reserved.