Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Abhi
(63)
Appukuttan
(40)
divya
(36)
Last 7 Days
Appukuttan
(660)
Babu Akkandi
(465)
Tejinder Singh ...
(273)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
Providing dfifferent accessibility for get/set of properties
Posted Date: 19 Jun 2008
Resource Type:
Tips
Category:
General
Author:
Lekshmi m nair
Member Level:
Silver
Rating:
Points
: 5
To restrict access to either of get or set accessor of a Property, this feature is used. Typically, this involves restricting the accessibility of the set accessor, while keeping the get accessor publicly accessible.
For example:
public string ReadOnly {
get
{
return name;
}
protected set
{ name = value;
}
}
Different access modifiers are generally the cases when one might need to "set" a property inside an assembly and does not want give access outside it. In the above example, the "set" accessor is "protected" meaning only inherited classes can set the property while others can only "get" it.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
Different access modifiers for get and set of a Property
.
Access Modifiers for Properties
.
Access Modifiers for get and set Properties
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Meaning(Expantion) for VIRUS,COMPUTER
Previous Resource:
Prefer new and delete operators over malloc and free
Return to Discussion Resource Index
Post New Resource
Category:
General
Post resources and
earn money
!
Related Resources
General keyboard shortcuts
Defragmentation
Microsoft SQL server VS MySQL
How to expand and collapse code block (regions) in Visual Studio?
Free Web Hosting Lists
dotNet Slackers
BizTalk Adaptors
Web Design
Contact Us
Privacy Policy
Terms Of Use