C#.Net Interview Question and Answers
106. |
Does C# support a variable number of arguments? |
|
-
Yes, using the params keyword.
- The arguments are specified as a list of arguments of a specific type, e.g., int. For ultimate flexibility, the type can be object.
- The standard example of a method which uses this approach is System.console.writeLine().
|
|
|
107. |
Which method will you call to start a thread? |
|
Start |
|
|
108. |
What is Generic? |
|
- Generic help us to create flexible strong type collection.
-
Generic basically seperate the logic from the datatype in order maintain better reusability, better maintainability etc.
|
|
|
109. |
What are the different types of polymorphism? |
|
There are two types of polymorphism. They are - Compile time Polymorphism
- Run time Polymorphism
|
|
Pankaj ,says |
Mar 14, 2014 |
Compile Time Polymorphism
Run time polymorphism
Examples : Method Overloading, Method Overriding
|
|
110. |
What is the difference between compile time polymorphism and run time polymorphism? |
|
Compile time Polymorphism- Compile time Polymorphism also known as method overloading.
- Method overloading means having two or more methods with the same name but with different signatures.
Run time Polymorphism- Run time Polymorphism also known as method overriding.
- Method overriding means having two or more methods with the same name , same signature but with different implementation.
|
|
|