Home
You may like this!
21.
What is one advantage of using named parameters?
  • A.
    You can pass the arguments in to the method in any order using the parameter names.
  • B.
    You can pass in optional arguments as long as you use the parameter names in your arguments.
  • C.
    Named parameters make compiling much faster.
  • D.
    Name parameters do not affect compile time.
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
Report
Name Email  
22.
What is an advantage of using generics in .NET?
  • A.
    Generics enable you to create classes that span types.
  • B.
    Generics enable you to create classes that accept the type at creation time.
  • C.
    Generics perform better than nongeneric classes.
  • D.
    Generics do not use optional parameters.
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
23.
What does the designator indicate in a generic class?
  • A.
    It is the parameter for all arguments passed in to the class constructor.
  • B.
    It is the parameter designator for the default method of the class.
  • C.
    It is a placeholder that will contain the object type used.
  • D.
    It is a placeholder that will serve as the class name.
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Report
Name Email  
24.
How are the values passed in generic methods?
  • A.
    They are passed by value.
  • B.
    They are passed by reference.
  • C.
    They must be encapsulated in a property.
  • D.
    They are passed during class instantiation.
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
25.
To parse a string that might contain a currency value such as $1,234.56, you should pass the Parse or TryParse method which of the following values?
  • A.
    NumberStyles.AllowCurrencySymbol
  • B.
    NumberStyles.AllowThousands
  • C.
    NumberStyles.Currency
  • D.
    A combination of all NumberStyles values
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Report
Name Email