C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
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
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
What is accessor and mutator?
Manas Ranjan Dash
15y
20.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
An Accessors just returns value of one of the member variables . It is a member function that accesses the contents of the object but does not modify the objects.
A Mutator just assign a new value to one of the member variable. It is a member function that can modify an object.
Every non-const member function are mutator.
Ravi B
15y
0
An accessor is a method that provide info on object. They are genrally properties which have a get method.On the other side Mutators can modify an object's state. They are the set method in a properties.
Manas Ranjan Dash
15y
0
What are the ways by which you can make sure that a class can not be inherited by other classes?
Why is Generics so important?
Message