How encapsulation and abstraction defined/used in C#.NET.

Answer Posted / animesh

Encapsulation means hiding the inner details from the user
For eg. We know that to open a lock we put key inside it
but what key will do inside the lock is hiddden. We use
inheritance for encapsulation similarly we use Abstract
classes to define abstraction in C#.

Is This Answer Correct ?    17 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If casting fails what type of exception is thrown?

565


In a C# class we have a SortedList member m_addinProjects we want to provide an iterator to allow the consumer of this class access to the items in the collection. Please provide an iterator method for the AnalyzeAddinsDLL class below and an example of how it would be used. namespace AnalyzeAddinsDLL { public class AllAddInProjects { private SortedList m_addinProjects; public AllAddInProjects() { m_addinProjects = new SortedList(); } } }

1914


Is c++ or c# better?

629


What are the Configuration files in .net?

592


Can scriptable objects have methods?

580






What is the use of return in c#?

573


What's the difference between class and object?

566


What is an abstract class c#?

580


What is dynamic object in c#?

591


How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?

704


What is the namespcae generally given to the webpage of the .NET Framework ?

684


Describe ado.net?

661


Could you explain the difference between func vs action vs predicate?

536


Can we extend sealed class in c#?

586


What is a struct in C#?

636