51. What are the features of c#?
1. C# is a simple and powerful programming language for writing enterprise edition applications.
This is a hybrid of C++ and VB. It retains many C++ features in the area statements,expressions, and operators and incorporated the productivity of VB.
2. C# helps the developers to easily build the web services that can be used across the Internet through any language, on any platform.
3. C# helps the developers accomplishing with fewer lines of code that will lead to the fewer errors in the code.
4. C# introduces the considerable improvement and innovations in areas such as type safety,versioning. events and garbage collections.
52. What are the types of errors?
1. Syntax error
2. Logic error
3. Runtime error
53. What is the difference between break and continue statement?
The break statement is used to terminate the current enclosing loop or conditional statements in which it appears. We have already used the break statement to come out of switch statements.
The continue statement is used to alter the sequence of execution. Instead of coming out of the loop like the break statement did, the continue statement stops the current iteration and simply returns control back to the top of the loop.
54. Define namespace?
The namespace are known as containers which will be used to organize the hierarchical set of .Net classes.
55. What is a code group?
A code group is a set of assemblies that share a security context.
56. What are sealed classes in C#?
The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class.
57. What is the difference between static and instance methods?
A method declared with a static modifier is a static method. A static method does not operate on a specific instance and can only access static members.
A method declared without a static modifier is an instance method. An instance method operates on a specific instance and can access both static and instance members. The instance on which an instance method was invoked can be explicitly accessed as this. It is an error to refer to this in a static method.
58. What are the different types of variables in C#?
Different types of variables used in C# are :
static variables
instance variable
value parameters
reference parameters
array elements
output parameters
local variables
59. What is meant by method overloading?
Method overloading permits multiple methods in the same class to have the same name as long as they have unique signatures. When compiling an invocation of an overloaded method, the compiler uses overload resolution to determine the specific method to invoke
60. What is parameters?
Parameters are used to pass values or variable references to methods. The parameters of a method get their actual values from the arguments that are specified when the method is invoked. There are four kinds of parameters: value parameters, reference parameters, output parameters, and parameter arrays.
61. Is C# is object oriented?
YEs, C# is an OO langauge in the tradition of Java and C++.
62. What is the difference between Array and Arraylist?
An array is a collection of the same type. The size of the array is fixed in its declaration. A linked list is similar to an array but it doesn’t have a limited size.
63. What are the special operators in C#?
C# supports the following special operators.
1. is (relational operator)
2. as (relational operator)
3. typeof (type operator)
4. sizeof (size operator)
5. new (object creator)
6. .dot (member access operator)
7. checked (overflow checking)
8 unchecked (prevention of overflow checking)
64. What is meant by operators in c#?
An operator is a member that defines the meaning of applying a particular expression operator to instances of a class. Three kinds of operators can be defined: unary operators, binary operators, and conversion operators. All operators must be declared as public and static.
65. What is a parameterized type?
A parameterized type is a type that is parameterized over another value or type.
66. What are the features of abstract class?
An abstract class cannot be instantiated, and it is an error to use the new operator on an abstract class.
An abstract class is permitted (but not required) to contain abstract methods and accessors.
An abstract class cannot be scaled.
67. What is the use of abstract keyword?
The modifier abstract is a keyword used with a class, to indicate that this class cannot itself have direct instances or objects, and it is intended to be only a 'base' class to other classes.
68. What is the use of goto statement?
The goto statement is also included in the C# language. This goto can be used to jump from inside a loop to outside. But jumping from outside to inside a loop is not allowed.
69. What is the difference between console and window application?
A console application, which is designed to run at the command line with no user interface.
A Windows application, which is designed to run on a user’s desktop and has a user interface.
70. What is the use of return statement?
The return statement is associated with procedures (methods or functions). On executing the return statement, the system passes the control from the called procedure to the calling procedure. This return statement is used for two purposes :
to return immediately to the caller of the currently executed code
to return some value to the caller of the currently executed code.
71. What is the difference between Array and LinkedList?
Array is a simple sequence of numbers which are not concerned about each others positions. they are independent of each others positions. adding,removing or modifying any array element is very easy. Compared to arrays ,linked list is a comlicated sequence of numbers.
72. Does C# have a throws clause?
No, unlike Java, C# does not require the developer to specify the exceptions that a method can throw.
73. Does C# support a variable number of arguments?
Yes, uisng the params keyword. The arguments are specified as a list of arguments of a specific type.
74. Can you override private virtual methods?
No, private methods are not accessible outside the class.
75. What is a multi cast delegates?
Each delegate object holds reference to a single method. However, it is possible for a delegate object to hold references of and invoke multiple methods. Such delegate objects are called multicast delegates or combinable delegates.
76. Which is an exclusive feature of C#?
Xml documentation.
77. Is using of exceptions in C# recommended?
Yes, exceptions are the recommended error handling mechanism in .NET Framework.
78. What does a break statement do in switch statements?
The break statement terminates the loop in which it exists. It also changes the flow of the execution of a program.
In switch statements, the break statement is used at the end of a case statement. The break statement is mandatory in C# and it avoids the fall through of one case statement to another.
79. Is C# object oriented?
Yes, C# is an OO language in the tradition of java and C++.
80. What is smart navigation?
The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.
1. C# is a simple and powerful programming language for writing enterprise edition applications.
This is a hybrid of C++ and VB. It retains many C++ features in the area statements,expressions, and operators and incorporated the productivity of VB.
2. C# helps the developers to easily build the web services that can be used across the Internet through any language, on any platform.
3. C# helps the developers accomplishing with fewer lines of code that will lead to the fewer errors in the code.
4. C# introduces the considerable improvement and innovations in areas such as type safety,versioning. events and garbage collections.
52. What are the types of errors?
1. Syntax error
2. Logic error
3. Runtime error
53. What is the difference between break and continue statement?
The break statement is used to terminate the current enclosing loop or conditional statements in which it appears. We have already used the break statement to come out of switch statements.
The continue statement is used to alter the sequence of execution. Instead of coming out of the loop like the break statement did, the continue statement stops the current iteration and simply returns control back to the top of the loop.
54. Define namespace?
The namespace are known as containers which will be used to organize the hierarchical set of .Net classes.
55. What is a code group?
A code group is a set of assemblies that share a security context.
56. What are sealed classes in C#?
The sealed modifier is used to prevent derivation from a class. A compile-time error occurs if a sealed class is specified as the base class of another class.
57. What is the difference between static and instance methods?
A method declared with a static modifier is a static method. A static method does not operate on a specific instance and can only access static members.
A method declared without a static modifier is an instance method. An instance method operates on a specific instance and can access both static and instance members. The instance on which an instance method was invoked can be explicitly accessed as this. It is an error to refer to this in a static method.
58. What are the different types of variables in C#?
Different types of variables used in C# are :
static variables
instance variable
value parameters
reference parameters
array elements
output parameters
local variables
59. What is meant by method overloading?
Method overloading permits multiple methods in the same class to have the same name as long as they have unique signatures. When compiling an invocation of an overloaded method, the compiler uses overload resolution to determine the specific method to invoke
60. What is parameters?
Parameters are used to pass values or variable references to methods. The parameters of a method get their actual values from the arguments that are specified when the method is invoked. There are four kinds of parameters: value parameters, reference parameters, output parameters, and parameter arrays.
61. Is C# is object oriented?
YEs, C# is an OO langauge in the tradition of Java and C++.
62. What is the difference between Array and Arraylist?
An array is a collection of the same type. The size of the array is fixed in its declaration. A linked list is similar to an array but it doesn’t have a limited size.
63. What are the special operators in C#?
C# supports the following special operators.
1. is (relational operator)
2. as (relational operator)
3. typeof (type operator)
4. sizeof (size operator)
5. new (object creator)
6. .dot (member access operator)
7. checked (overflow checking)
8 unchecked (prevention of overflow checking)
64. What is meant by operators in c#?
An operator is a member that defines the meaning of applying a particular expression operator to instances of a class. Three kinds of operators can be defined: unary operators, binary operators, and conversion operators. All operators must be declared as public and static.
65. What is a parameterized type?
A parameterized type is a type that is parameterized over another value or type.
66. What are the features of abstract class?
An abstract class cannot be instantiated, and it is an error to use the new operator on an abstract class.
An abstract class is permitted (but not required) to contain abstract methods and accessors.
An abstract class cannot be scaled.
67. What is the use of abstract keyword?
The modifier abstract is a keyword used with a class, to indicate that this class cannot itself have direct instances or objects, and it is intended to be only a 'base' class to other classes.
68. What is the use of goto statement?
The goto statement is also included in the C# language. This goto can be used to jump from inside a loop to outside. But jumping from outside to inside a loop is not allowed.
69. What is the difference between console and window application?
A console application, which is designed to run at the command line with no user interface.
A Windows application, which is designed to run on a user’s desktop and has a user interface.
70. What is the use of return statement?
The return statement is associated with procedures (methods or functions). On executing the return statement, the system passes the control from the called procedure to the calling procedure. This return statement is used for two purposes :
to return immediately to the caller of the currently executed code
to return some value to the caller of the currently executed code.
71. What is the difference between Array and LinkedList?
Array is a simple sequence of numbers which are not concerned about each others positions. they are independent of each others positions. adding,removing or modifying any array element is very easy. Compared to arrays ,linked list is a comlicated sequence of numbers.
72. Does C# have a throws clause?
No, unlike Java, C# does not require the developer to specify the exceptions that a method can throw.
73. Does C# support a variable number of arguments?
Yes, uisng the params keyword. The arguments are specified as a list of arguments of a specific type.
74. Can you override private virtual methods?
No, private methods are not accessible outside the class.
75. What is a multi cast delegates?
Each delegate object holds reference to a single method. However, it is possible for a delegate object to hold references of and invoke multiple methods. Such delegate objects are called multicast delegates or combinable delegates.
76. Which is an exclusive feature of C#?
Xml documentation.
77. Is using of exceptions in C# recommended?
Yes, exceptions are the recommended error handling mechanism in .NET Framework.
78. What does a break statement do in switch statements?
The break statement terminates the loop in which it exists. It also changes the flow of the execution of a program.
In switch statements, the break statement is used at the end of a case statement. The break statement is mandatory in C# and it avoids the fall through of one case statement to another.
79. Is C# object oriented?
Yes, C# is an OO language in the tradition of java and C++.
80. What is smart navigation?
The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.