Sir, I have 16 year of IT experience and working as an Enterprise Architect. I follow you from my early days. Your words and texts are really motivated and kept my level to update myself continuously. I take a moment to thank you sir. Royal salute to you. You are great and boom for many like me. 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
If you liked this Session, Do share and email on questpond@questpond.com the Link for your FB, Twitter, and Linkedin and avail the discount price for the "Learn Design Pattern Step by Step" www.questpond.com/buynow.php?courseid=MTA=.
Sealed is used for Singleton to restrict the use of new keyword and object creation in a nested derived class. If some other class is getting inherited inside the singleton class then private constructor becomes accessible inside the nested derived class. Again you can write new keyword and that will violate the entire objective of creating single instance.
Sir,since class is having private constructor, that class is restricting instance creation and inheritance right.Then what is the purpose of sealed class
Regarding the safe iterator, what will happen even though you defined a property as Ienumable, if you cast the property to a list? You will then perform Add, in the original property the element that was added will appear like that? But like that, do you have an argument that explains that this is also avoided?
I want to ask one Question: If we are going to use singleton design pattern in application then all request goes to, into a queue then performance will be down it means bottleneck will come. then why Singleton?
Parallelism is different from concurrency. In single ofcourse performance will be less but data will be thread safe and you can still have another ways of improving performance.
Its dependes on the what type ofrequirement we have, if we are going to use Singleton, then why we are going to inherit it or any object oriented features. for an instance : the Singleton can be used if any master data(readonly) we need to used through out the application
@Questpond If you are changing the data type of GetCountries from List to IEnumberable and saying that now we don't get methods like Add() which can manipulate the data. I assume that assumption is wrong, why because anytime we can type cast the IEnumberable type to List type again. And once that is done then we again have access to GetCountries() which can manipulate the data. Please help me explain this.
Singleton class is not a static class like your code, and your demonstration is only to show the difference between Singleton instance and naked static instance, not the difference between singleton class and static class
Why many videos paid? Please make it free so that the needy people can get knowledge. Knowledge sharing is biggest knowledge earning. If you consider yourself as a teacher, please don't make paid videos as I can't afford it, it should be free and if I feel may donate you money or donate blessings 😉
So You are a beggar who can not afford 20$. Cheap and Greedy indians. These indians are blood leechers. They do not understand teacher has family. Selfish
25+ OOPS Interview Questions : th-cam.com/video/u99wAoBjDvQ/w-d-xo.html
30 Important C# Interview Questions : th-cam.com/video/BKynEBPqiIM/w-d-xo.html
Software Architecture Interview Questions : th-cam.com/video/AtTgcbLOqMM/w-d-xo.html
20+ SQL Server Interview Questions : th-cam.com/video/SEdAF8mSKS4/w-d-xo.html
10+ Power BI Interview Questions : th-cam.com/video/Cozc9WNBRt4/w-d-xo.html
20 MSBI Interview Questions : th-cam.com/video/Nw_sHEKnOUE/w-d-xo.html
SQL Server Joins : th-cam.com/video/KTvYHEntvn8/w-d-xo.html
SQL Step by Step - th-cam.com/video/uGlfP9o7kmY/w-d-xo.html
Angular Step by Step Tutorial for Beginners : th-cam.com/video/-9VcW7MBDs8/w-d-xo.html
25 Angular Interview Questions : th-cam.com/video/-jeoyDJDsSM/w-d-xo.html
25 Important ASP.NET Interview Questions : th-cam.com/video/pXmMdmJUC0g/w-d-xo.html
35 Important JavaScript Interview Questions : th-cam.com/video/Zb4dPi7CANU/w-d-xo.html
20 MySQL Interview Questions : th-cam.com/video/9hfjC-BpY20/w-d-xo.html
5 MSBI Interview Questions : th-cam.com/video/5E815aXAwYQ/w-d-xo.html
20 PHP Interview Questions : th-cam.com/video/1bpNSynUrl8/w-d-xo.html
Sir, I have 16 year of IT experience and working as an Enterprise Architect. I follow you from my early days. Your words and texts are really motivated and kept my level to update myself continuously. I take a moment to thank you sir. Royal salute to you. You are great and boom for many like me. 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
By far the best video on this subject. Nobody explained it this way.
If you liked this Session, Do share and email on questpond@questpond.com the Link for your FB, Twitter, and Linkedin and avail the discount price for the "Learn Design Pattern Step by Step" www.questpond.com/buynow.php?courseid=MTA=.
To be fair most clear explanation...thanks shiv sir
Sealed is used for Singleton to restrict the use of new keyword and object creation in a nested derived class. If some other class is getting inherited inside the singleton class then private constructor becomes accessible inside the nested derived class. Again you can write new keyword and that will violate the entire objective of creating single instance.
Static class also sealed classes ...cant be inherited
@@srikantamohanty1815 But that is the problem you cannot create an instance method in instance class and we cannot extend it on new requirement...
Excellent explanation Sir thank u so much, pls keep posting more
Very Impressive!
After two years today also gurupournami... Today I watched
Its very nice video to clear the basic funda.
Thanks sir for such a detailed and informative session
Sir,since class is having private constructor, that class is restricting instance creation and inheritance right.Then what is the purpose of sealed class
Regarding the safe iterator, what will happen even though you defined a property as Ienumable, if you cast the property to a list? You will then perform Add, in the original property the element that was added will appear like that? But like that, do you have an argument that explains that this is also avoided?
I learned a lot . thank you
I want to ask one Question: If we are going to use singleton design pattern in application then all request goes to, into a queue then performance will be down it means bottleneck will come. then why Singleton?
Parallelism is different from concurrency. In single ofcourse performance will be less but data will be thread safe and you can still have another ways of improving performance.
you are great sir 👏
Best explanation
Can we have one more video on TPL and TAL , means task vs async await… where when to use it
next level teacher you are :) Bingo
Nice discussion….
very good lots of thanks
s. Thank you In The setup❤️
Love your videos
Nice explanation
Its dependes on the what type ofrequirement we have, if we are going to use Singleton, then why we are going to inherit it or any object oriented features. for an instance : the Singleton can be used if any master data(readonly) we need to used through out the application
hi, cant we do the same with static class
👌👌👌Thank you sir 🙏
Try zooming in (ctrl+scroll)
@Questpond
If you are changing the data type of GetCountries from List to IEnumberable and saying that now we don't get methods like Add() which can manipulate the data. I assume that assumption is wrong, why because anytime we can type cast the IEnumberable type to List type again. And once that is done then we again have access to GetCountries() which can manipulate the data. Please help me explain this.
.ToList() will give you a new list.
Thanks sir
Great explanation
👊👊👊👊👊👊Smash the Subscribe button if you like it.👊👊👊👊👊👊
Thanks a lot...It was great session...
👊👊👊👊👊👊Smash the Subscribe button if you like it.👊👊👊👊👊👊
Why can't i encapsulate countries list in static class? I could make list private and create a public method for getting that list
Hi, Why you did not create a private constructor for your "Singleton" class?
he did it, watch till end
hi sir
Singleton class is not a static class like your code, and your demonstration is only to show the difference between Singleton instance and naked static instance, not the difference between singleton class and static class
Where to use singletone pattern
😀
Why your singleton class has static keyword? As far I know Singleton class can not have static keyword.
And why not ?
Static cannot be inheited
Wikipedia is not credible source for such things.
Its still a source where people have put lot of effort.
Wikipedia is a decent source for information except for history, politics, and religion.
🐅👨👩👦
Why many videos paid? Please make it free so that the needy people can get knowledge. Knowledge sharing is biggest knowledge earning. If you consider yourself as a teacher, please don't make paid videos as I can't afford it, it should be free and if I feel may donate you money or donate blessings 😉
So You are a beggar who can not afford 20$. Cheap and Greedy indians. These indians are blood leechers. They do not understand teacher has family. Selfish
So sad comment what can i say. We also have families.