locked
encapsulation RRS feed

Answers

  • Encapsulation is a language construct that provides bundling of data and methods that operate on that data.

    • Proposed as answer by Mike Feng Monday, December 31, 2012 9:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Saturday, December 29, 2012 5:05 PM
  • Hi

    Encapsulation is to hide the variables or something inside a class, preventing unauthorized parties to use. So the public methods like getter and setter access it and the other classes call these methods for accessing.

    Hope this helps


    Give youself a round of applause!!

    • Proposed as answer by Mike Feng Monday, December 31, 2012 9:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Sunday, December 30, 2012 3:25 AM
  • Hi aditya kr singh,

    • With Encapsulation you can hide (restrict access) to critical data members in your code , which improves security
    • Encapsualtion combines data and actions together (just like a capsule)

    Regards, http://www.shwetalodha.blogspot.in/

    Monday, December 31, 2012 6:30 AM
  • I see you asking lot of basic questions. This forum is not a tutorial. Here users post problems they face in day to day activities. So, I suggest you to go through some online material or books to get basic understanding of OOPS and C#.

    Below are some good tutorials on Object Oriented concepts and C#,

    CodeProject - Object Oriented Programming Concepts

    CSharp Corner - Object oriented C#

    MSDN - Object Oriented Programming Concepts


    Please mark this post as answer if it solved your problem. Happy Programming!

    • Proposed as answer by Shyam Kr Monday, December 31, 2012 7:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Monday, December 31, 2012 7:19 AM

All replies

  • Encapsulation is a language construct that provides bundling of data and methods that operate on that data.

    • Proposed as answer by Mike Feng Monday, December 31, 2012 9:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Saturday, December 29, 2012 5:05 PM
  • Hi

    Encapsulation is to hide the variables or something inside a class, preventing unauthorized parties to use. So the public methods like getter and setter access it and the other classes call these methods for accessing.

    Hope this helps


    Give youself a round of applause!!

    • Proposed as answer by Mike Feng Monday, December 31, 2012 9:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Sunday, December 30, 2012 3:25 AM
  • Hi aditya kr singh,

    • With Encapsulation you can hide (restrict access) to critical data members in your code , which improves security
    • Encapsualtion combines data and actions together (just like a capsule)

    Regards, http://www.shwetalodha.blogspot.in/

    Monday, December 31, 2012 6:30 AM
  • I see you asking lot of basic questions. This forum is not a tutorial. Here users post problems they face in day to day activities. So, I suggest you to go through some online material or books to get basic understanding of OOPS and C#.

    Below are some good tutorials on Object Oriented concepts and C#,

    CodeProject - Object Oriented Programming Concepts

    CSharp Corner - Object oriented C#

    MSDN - Object Oriented Programming Concepts


    Please mark this post as answer if it solved your problem. Happy Programming!

    • Proposed as answer by Shyam Kr Monday, December 31, 2012 7:37 AM
    • Marked as answer by Mike Feng Friday, January 4, 2013 7:54 AM
    Monday, December 31, 2012 7:19 AM
  • I really suggest you try using a search engine. There are really good articles, tutorials and what not - hundreds if not thousands can be found via google or bing.
    Monday, December 31, 2012 7:36 AM
  • Idea of Encapsulation is that a program that uses a class should not have to worry about how that class works internally,the program creates an instance of that class and calls its method.A class might need to maintain all sorts of internal state information in order to perform its various methods.This additional state information and activity is hidden from the program that is using it.
    Friday, April 26, 2013 11:37 AM