When should I use static in C#?


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

Post New Answer

More C Sharp Interview Questions

What is datagrid c#?

0 Answers  


Is predicate a functional interface?

0 Answers  


What is stack and heap?

7 Answers   Wipro,


How to reduce image resolution in C#?

0 Answers   IBM,


7.What are typed data set?

2 Answers   Ebix, Mphasis,


Is c# easier than javascript?

0 Answers  


Explain about Serialize and MarshalByRef?

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 are the examples of data types?

0 Answers  


Are classes passed by reference in c#?

0 Answers  


What does int32 mean?

0 Answers  


What are the types of access modifiers?

0 Answers  


Categories