What is CrazyEngico.com (CE)?

CrazyEngico (CE) is a one-stop solution for interview questions and answers, domain knowledge, e-learning, tutorials, articles and many more learning material.
e-learning - Intelligent e-learning tutorials and articles
Domain Knowledge Learn about various business domains/verticals such as Banking, Financial, Insurance, Healthcare and many more...
Interview Questions and Answers - Post your questions and answers. 1000+ database of ready questions and answers available to prepare for an interview.
Tutorials - 300+ video tutorials from beginner to expert level.
Articles - 300+ technical articles to understand concepts.
Forum - A technical forum to post your queries/responses.

Search Questions

Interview Questions/Answers

Interview Q & A >> C# >> What is Encapsulation?

<< Previous Question Navigator Next >>

0        0
What is Encapsulation? (Views: 2389)


3        1

Encapsulation is the mechanism that binds together code and data it manipulates, and keeps both safe from outside interference and misuse. In short it isolates a particular code and data from all other codes and data. A well-defined interface controls the access to that partcular code and data.
In C#, encapsulation is implemented using the access modifier keywords public, private, and protected. The concept of encapsulation is also known as data hiding or information hiding. When done properly, we can create software 'black boxes' that can be independently tested and used.

Submitted By: Anonymous | Created On: 5/16/2009 4:37:23 PM

0        0

Encapsulation is a process of hinding all the internal working of an object from the outside world.
Encapsulation solves the problem at implementaion time(how). Abstraction is achieved through Encapsulation.
A real world example of Encapsulation is T.V. the internal working of T.V. is hide from us.

Class A
        private int a=10;
        public int A
                 get{return a;}
a is not accessible from outside word

Submitted By: danie bond | Created On: 1/9/2013 3:06:28 AM

Post your Answer
Your answer will be first reviewed by our administrator before it appears on the site.

Your Answer:

Display Name:

By clicking on Submit button you agree to the Terms of Service agreement.

Copyright © 2018 CrazyEngico.com. All rights reserved.
CrazyEngico.com is not responsible for the content and CrazyEngico.com does not evaluate or guarantee the accuracy of any CrazyEngico.com content.
Please read our terms of service agreement before using this site.