What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Sharp Interview Questions

What exactly is serverless?

0 Answers  


How to transpose rows into columns and columns into rows in a multi-dimensional array?

4 Answers   Microsoft,


What is difference between c sharp and c#?

0 Answers  


What are the fundamental oop concepts?

0 Answers  


What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?

0 Answers   BirlaSoft,






What is mvc pattern in c#?

0 Answers  


What is the use of static in c#?

0 Answers  


What is an int in c#?

0 Answers  


hi, I am a begineer to c sharp. I have written a code for finding out prime numbers. Can anyone identify what are the flaws in my code. Kindly donot complex the code or present logic because i am new to c sharp and just started learning programming language.Thanks in advance. class Program { static void Main(string[] args) { int a,b=1; a = int.Parse(Console.ReadLine()); c= int.Parse(Console.ReadLine()); if (a % b == 0 && a % 2 != 0 && a % a == 0) Console.WriteLine(a); else if (a % b == 0 && a % 2 == 0) Console.WriteLine(a%2); Console.WriteLine("Number is not PRIME"); Console.ReadLine(); } } }

2 Answers  


What is the purpose of abstract class in c#?

0 Answers  


what is collections and what is generics

4 Answers   Bally Technologies,


destructor, Dispose, Finalize - How they relate to each other

1 Answers   Synechron,


Categories