Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sivasankar GorantlaRank #5,536 · 296 reputationPosted Jun 20, 2017, 4:05 AM EDT
Naveen BishtRank #1,462 · 1.1K reputationPosted Jun 19, 2017, 8:23 PM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 20, 2017, 1:36 AM EDT
There is having some differences between private class and sealed class.
+ Private class usually used on inner class, that don't want to external to seeing it, it is created the closure.
For example,
public class Parent { // some thing at here private readonly SubClass sc; // ctor public Parent () { sc = new SubClass(); } public string foo () { return sc.bar(); } private class SubClass { // have some thing here public string bar() { //.............. return "..........."; } } }+ Sealed class is meaning: you can't inherit from it, it is a finally class in inherited hierarchy (leaf node).
For examples, in .NET 2.0, Microsoft built HttpContext is a sealed class, and in .NET 3.5 they are wrapper it became HttpContextWrapper for Unit Testing it.
That is my knowledge about 2 of its. If it have any problems, you can post at here, and we shall discuss later.
Vivek KumarRank #272 · 9.3K reputationPosted Jun 20, 2017, 4:59 AM EDT
Anil JhaRank #1,988 · 733 reputationPosted Jul 3, 2017, 3:55 AM EDT
Kaushal ParikRank #2,749 · 510 reputationPosted May 5, 2017, 5:46 AM EDT
Khaja MoizuddinRank #270 · 9.4K reputationPosted May 5, 2017, 7:48 AM EDT
Satyendra PatelRank #1,411 · 1.2K reputationPosted May 5, 2017, 7:48 PM EDT
Alok Tripathi25 reputationPosted Jun 19, 2017, 7:32 PM EDT
Satyaprakash SamantarayRank #101 · 21.1K reputationPosted Jul 3, 2017, 2:55 AM EDT
Ramesh BarikRank #3,664 · 401 reputationPosted May 5, 2017, 7:35 PM EDT
Dharmraj ThakurRank #577 · 4.2K reputationPosted May 7, 2017, 9:44 PM EDT