C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
What are properties in C#?
Mohan Gupta
12y
1.2k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Properties are smart field in C#. Its a extension of fields or variable. By properties we can access our private variable as public manner. It will not allocate a memory but it will share a memory form fields or variable. Property has 3 types of Process. 1. Read(get) 2. Write(set) 3. Read and Write(get and set) We can call Read and Write property as a Auto implemented Property. Property has 2 types of Accessers. 1. get{}- It will return a value to the variable. 2. set{}- It will assign a value to the variable.
lavanya veerasamy
12y
1
if we want to use private variables one class in another class then we have to go for porperties
Nidadavole Chowdary
12y
0
What is a Class in C#?
What is using keyword in C#?
Message