1:What is the difference between an encapsulation and abstraction?
2. When to use encapsulation?
3. When to use an abstraction?
1:What is the difference between an encapsulation and abstraction?
2. When to use encapsulation?
3. When to use an abstraction?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nilesh JadavPosted Oct 20, 2015, 2:51 AM
Read this Link to Know When to use Abstraction :
http://www.onlinebuff.com/article_oops-principle-abstraction-in-c-with-an-example-and-explanation_5.html
public class School
{
private string Schooldepartname;
public string SchoolDepartname
{
get
{
return Schooldepartname;
}
set
{
Schooldepartname =value;
}
}
}
public class Departmentmain
{
public static int Main(string[] args)
{
School d= new School();
d.SchoolDepartname="Communication";
Console.WriteLine("The Dept. Name is :{0}",d.SchoolDepartname);
return 0;
}
}
Thank you ! Hope that Helps !!
Sujeet SumanPosted Oct 20, 2015, 2:31 AM
David SmithPosted Oct 6, 2015, 11:58 PM
Munesh SharmaPosted Oct 6, 2015, 11:56 PM
Munesh SharmaPosted Oct 6, 2015, 11:55 PM