C# Interview Questions:
1) What are the advantages of C# over C ,C++ ,Java?
Like C++ and Java, C# is a high-level object-oriented programming language. It is generally more efficient than Java and has useful features such as operator overloading. C# is based on C++ but has several advantages over this older language: it is type-safe, more comprehensively object-oriented, and the syntax has been simplified in several important ways. Most importantly, C# interoperates exceptionally well with other languages on the .NET platform. For this reason, C# is a better choice for building applications for .NET.
2)How are NameSpaces are used in C#?
Classes in the .NET framework can be organized using namespaces. The scope of a class is declared using the namespace keyword. You can then include methods from the namespace in your code by including the line “using [namespace];” at the start of your program.
3)What is a Constructor?
A constructor is the method of a class that is called when an object of that class is created. The constructor initializes class parameters and has the same name as the class.
No comments:
Post a Comment