What is the difference between static class and singleton class in c#?


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

Post New Answer

More C Sharp Interview Questions

Can we have private constructor in our class file. When we are trying to create instance for the class will it create or throw error regarding that?

5 Answers  


What is int32?

0 Answers  


What is difference between array and arraylist in c#?

0 Answers  


Explain About disco and uddi

0 Answers   Digital GlobalSoft,


What is int tryparse in c#?

0 Answers  


What does console readline do?

0 Answers  


How can you sort the elements of the array in descending order?

4 Answers  


What is assembly and dll in c#?

0 Answers  


Can a class be protected in c#?

0 Answers  


What is the role of the datareader class in ado.net connections?

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  


How to make a class non-inheritable other than sealed?

7 Answers  


Categories