Encapsulation means
In your normal aspx.cs page you can see
public partial class LoginPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ }}
public and protected are encapsulated inside class....... similarly will come if used private also
This is for encapsulation./...
Abstraction:
Means for the class we cant create object (eg) static
class Employee
{
public static void main(string args[]){}
or
public static function1(){}
}
we wont create object like following(we cant since it is static)
function1 f=new function1() // Wrong
instead will access directly by using
Employee emp=new Employee()
emp.function1() //correct
Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator