How would you describe encapsulation in c#?



How would you describe encapsulation in c#?..

Answer / Nitin Rana

{"encapsulation": [n "Encapsulation is a fundamental principle of object-oriented programming where data and functions that operate on the data are bundled together into classes or objects.",n "In C#, encapsulation is achieved using access modifiers such as private (data can only be accessed within the class), protected (data can be accessed within the class and derived classes), internal (data can be accessed within the same assembly) and public (data can be accessed from anywhere).",n "Encapsulation helps to hide the implementation details of a class and provides data integrity by limiting direct access to its fields."]}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is type cast in C#?

1 Answers   TryTechnicals Pvt Ltd,


Hai, I want to open a new form while the previous form is hiding or closing. I tried this with using MDI.I created one form like ParentForm.placed one button control.when clicked one that it opend new form like ChildForm.When i set the property of ChildForm to Maximize,but the ParentForm button control also appearing on the childform. so plz help me how to hide parentform controls(hide parentform while it is childform opened) thanq..

1 Answers  


Distinguish between a class and struct?

1 Answers  


What do you mean by a windows process in regards to memory allocation?

1 Answers  


Does c# have primitives?

1 Answers  


List down the access modifiers available in c#?

1 Answers  


Explain manifest & metadata.

2 Answers   Wipro,


What is the process of delegation?

1 Answers  


What is int tryparse in c#?

1 Answers  


What is oledb in c#?

1 Answers  


What is difference between asp net and c# net?

1 Answers  


What is reference c#?

1 Answers  


Categories