Static class vs Singleton in C# | C# Interview Questions & Answers | Static & Singleton in CSharp

preview_player
Показать описание
Static class vs Singleton C#

See our other Step by Step video series below :

Happy Learnings from Questpond.

-----------------------------------------------------------------------------------------------
For more details :-
📱 Mob. No. : +91-9967590707 / +91-7700975156 / +91-22-49786776

Share, Support, Subscribe and Connect us on!!!

#StaticVSSingleton #CSharpInterviewQuestions&Answers #StaticVSSingletonTutorial #Static&SingletonIn C# #StaticVSSingletonTraining #CSharpInterviewQuestions
Рекомендации по теме
Комментарии
Автор

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. 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

gururajaraghavendrarao
Автор

By far the best video on this subject. Nobody explained it this way.

sahiljain
Автор

To be fair most clear explanation...thanks shiv sir

mominwasae
Автор

Thanks sir for such a detailed and informative session

minutecode
Автор

Excellent explanation Sir thank u so much, pls keep posting more

Gauravkumar-jmve
Автор

Its very nice video to clear the basic funda.

vineetchaudhary
Автор

Sir, since class is having private constructor, that class is restricting instance creation and inheritance right.Then what is the purpose of sealed class

malayaliop
Автор

Can we have one more video on TPL and TAL , means task vs async await… where when to use it

JarvisAlgo
Автор

@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.

aagebadho
Автор

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?

eladyehuda
Автор

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

bishwaitsahoo
Автор

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?

vineetchaudhary
Автор

Why can't i encapsulate countries list in static class? I could make list private and create a public method for getting that list

hearyourmood
Автор

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.

nilabhrabhattacharjee
Автор

Thanks a lot...It was great session...

chetslove
Автор

After two years today also gurupournami... Today I watched

pulapakadurgaprasad
Автор

Hi, Why you did not create a private constructor for your "Singleton" class?

sayanchatterjee
Автор

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

hlch
Автор

Why your singleton class has static keyword? As far I know Singleton class can not have static keyword.

BimalDaslol
Автор

Wikipedia is not credible source for such things.

td