Why we use get and set method in c#?
Answer / Suraj Vikram Shahi
Get and Set methods are used in C# to control the access to the private fields of a class. The Getter (get) method retrieves the value of the field, while the Setter (set) method sets the value of the field, ensuring data integrity and providing encapsulation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why ienumerable is used in c#?
What do you mean by generic class in c#?
Describe an abstract class?
What is sql transaction in c#?
What is the namespace for datatable in c#?
What does firstordefault mean in c#?
What is expression c#?
coding for delegates?
Is a structure a class?
Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?
What does it meant to say “the canonical” form of XML ?
How to update the gui from another thread 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)