adplus-dvertising
frame-decoration

Question

Why are generics used?

a.

Generics make code more fast

b.

Generics make code more optimised and readable

c.

Generics add stability to your code by making more of your bugs detectable at compile time

d.

Generics add stability to your code by making more of your bugs detectable at run time

Posted under C# programming

Answer: (c).Generics add stability to your code by making more of your bugs detectable at compile time

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Why are generics used?

Similar Questions

Discover Related MCQs

Q. Which of these is an correct way of defining generic method?

Q. Select the type argument of open constructed type?

Q. Pointer variable is used to hold the _________ of the variable.

Q. Which among the given operators is referred to as ‘address of’ operator?

Q. Choose the correct statement among the given statements?

Q. What is the size of a char pointer?

Q. After incrementing a float pointer ptr by 1 it would be incremented by __________

Q. Which of the following job is done by the instruction ++*p for an integer pointer p?

Q. Which among the following is referred as an array of pointers?

Q. Among the given pointer which of following cannot be incremented?

Q. How many values can be returned from a function simultaneously using pointers?

Q. Consider an integer pointer *a.
++*a will increment ___________ while *a++ will increment __________

Q. Among the given pointers which of following cannot be incremented?

Q. A structure pointer points to __________

Q. What will be the declaration of the variable ptr as the pointer to array of 6 floats?

Q. Choose the statement which defines the Nullable type Correctly:

Q. What does the following code depicts?

1. System.Nullable count;
2. bool? done;

Q. Which operator is commonly used to find the size of the type of C#?