Hi friends,
I want to know that I have a class and want to get restriction on the making of objects of that class? If I have restriction that we have to make only 5 objects of that class and if we are making 6th one then object should not created so anyone know such phenomenon that we can restricted a class to make an object to a limit then tell me? How it is possible?
Restriction to make an object of a class in C#
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Jan 30, 2012, 1:18 PM EST
I recently coded something on these lines in this thread for a maximum of 10 objects so you'll need to change that to a maximum of 5:
http://www.c-sharpcorner.com/Forums/Thread/157864/C-Sharp-trivia-question.aspx