What is the use of constructor in c# with example?


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

Post New Answer

More C Sharp Interview Questions

How can you force derived classes to provide new method implementations for virtual methods?

0 Answers  


What is dependency in software?

0 Answers  


How you will handle session when deploying application in more than a server? Describe session handling in a webform, how does it work and what are the limits?

3 Answers   Microsoft,


Are value types sealed?

0 Answers  


What is streamreader/streamwriter class?

0 Answers  


How can I use .NET components from COM programs?

0 Answers   DELL,


Explain “static” keyword in c#?

0 Answers  


What is the purpose of abstract class 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 are destructors in C#?

1 Answers   TryTechnicals Pvt Ltd,


What is a Assembly?

0 Answers   UGC Corporation,


which datatype i have to use we i need dynamic size.for eg. empname .in first row it have only five chars.but next row it have 100 chars.

3 Answers  


Categories