1.which of the following is a valid delegate definition? a.private

Project Description:

1.which of the following is a valid delegate definition? a.private delegate float mydelegate(float); b.private delegate mydelegate(x); c.private delegate mydelegate(float x); d.private delegate void mydelegate(float x);2.which of the following statements is not true of delegate variables? a.you need to use a cast operator to execute the method to which a delegate variable refers. b.a struct or class can contain fields that are delegate variables. c.you can make an array or list of delegate variables. d.you can use addition to combine delegate variables into a series of methods and use subtraction to remove a method from a series. 3.if the employee class inherits from the person class, covariance lets you do which of the following? a.store a method that returns a person in a delegate that represents methods that return an employee. b.store a method that returns an employee in a delegate that represents methods that return a person. c.store a method that takes a person as a parameter in a delegate that represents methods that take an employee as a parameter. d.store a method that takes an employee as a parameter in a delegate that represents methods that take a person as a parameter. 4.if the employee class inherits from the person class, contravariance lets you do which of the following? a.store a method that returns a person in a delegate that represents methods that return an employee. b.store a method that returns an employee in a delegate that represents methods that return a person. c.store a method that takes a person as a parameter in a delegate that represents methods that take an employee as a parameter. d.store a method that takes an employee as a parameter in a delegate that represents methods that take a person as a parameter. 5.in the variable declaration action_order_ processor, the variable processor represents which of the following? a.methods that take no parameters and return an order object. b.methods that take an order object as a parameter and return void. c.methods that take an order object as a parameter and return an order object. d.methods provided by the action class that take no parameters and return void. 6.in the variable declaration func_order_ processor, the variable processor represents which of the following? a.methods that take no parameters and return an order object. b.methods that take an order object as a parameter and return void. c.methods that take an order object as a parameter and return an order object. d.methods provided by the action class that take no parameters and return void. 7.suppose f is declared by the statement func_float, float_ f. then which of the following correctly initializes f to an anonymous method? a.f = (float x) { return x * x; }; b.f = delegate { return x * x; }; c.f = float func(float x) { return x * x; }; d.f = delegate(float x) { return x * x; }; 8.suppose the variable note is declared by the statement action note. then which of the following correctly initializes note to an expression lambda? a.note = { return x * x; }; b.note = () { return x * x; }; c.note = () =_ messagebox.show("hi"); d.note = messagebox.show("hi"); 9.suppose the variable result is declared by the statement func_float, float_ result. which of the following correctly initializes result to an expression lambda? a.result = (float x) =_ x * x; b.result = (x) =_ return x * x; c.result = x =_ x * x; d.both a and c are correct. 10.which of the following statements about statement lambdas is false? a.a statement lambda can include more than one statement. b.a statement lambda cannot return a value. c.a statement lambda must use braces, { }. d.if a statement lambda returns a value, it must use a return statement.
Skills Required:
Project Stats:

Price Type: Negotiable

Expired
Total Proposals: 7
1 Current viewersl
68 Total views
Project posted by:

Proposals

Proposals Reputation Price offered
  • 4.6
    103 Jobs 52 Reviews
    $0 in 0 Day
  • 4.9
    95 Jobs 45 Reviews
    $0 in 0 Day
  • 4.5
    355 Jobs 236 Reviews
    $0 in 0 Day
  • 4.9
    1997 Jobs 1016 Reviews
    $30 in 0 Day
  • 4.8
    60 Jobs 32 Reviews
    $0 in 0 Day
  • 4.7
    74 Jobs 28 Reviews
    $0 in 0 Day