1 answer

All questions in C#: using System; using System.Linq; using System.Data.Linq; using System.Xml.Linq; using System.Collections; and that...

Question:

All questions in C#:

using System;

using System.Linq;

using System.Data.Linq;

using System.Xml.Linq;

using System.Collections;

and that the following array is defined:

string[] colors = { ""green"", ""brown"", ""blue"", ""red"" };

var query = from c in colors where c.Length > 3 orderby c.Length select c;

what type is variable query?

int
string
IEnumerable<string>
IEnumerable<int>
IQueryable<string>
IQueryable<int>

In current .NET Framework, what assembly must be included in a project to use the SoundPlayer class?

System
System.Media
corelib
Sound

In Generic Method implementation, the ________ clause specifies the type constraint for type parameter T.

when
constraint
where
cnstr

All arrays implicitly inherit from which generic interface?

IList
IEnumerable
IEnumerator
a and b
a and c

To avoid having to use fully qualified referenced classes, you could:

Add a reference to the class.
Add an import statement for the class.
Add a using directive.
Inherit from the class.
Package the classes in the same solution.

Answers

what type is variable query?

Answer:

IEnumerable<string>

Explanation:

The compiler translates this query to:

IEnumerable<string> query = colors   .Where   (c => c.Length > 3)   .OrderBy (c => c.Length);

The Where and OrderBy methods, in this case, resolve to Enumerable.Where and Enumerable.OrderBy, which both return IEnumerable<T>. T is inferred to be stringbecause we haven't transformed or projected the input sequence elements in any way.

In current .NET Framework, what assembly must be included in a project to use the SoundPlayer class?

Answer:

Sound

Explanation:

To play a sound using the SoundPlayer class, configure a SoundPlayer with a path to the .wav file and call one of the play methods.

In Generic Method implementation, the ________ clause specifies the type constraint for type parameter T.

Answer:

where

Explanation:

The where clause in a generic definition specifies constraints on the types that are used as arguments for type parameters in a generic type, method, delegate

All arrays implicitly inherit from which generic interface?

Answer:

a and b

Explanation:

All arrays implicitly inherit from the generic interfaces IList and Innumerable with the type of thearray as the type argument, so the string array colors2 implements IEnumerable< string >

.

Similar Solved Questions

1 answer
The following questions are based on the papin mechanism below: Explain the role of each amino...
The following questions are based on the papin mechanism below: Explain the role of each amino acid in the catalytic triad. Site directed mutagenesis replacing the active site asp in the papain protease with an ala showed that catalytic activity was not significantly affected. Why would you think th...
1 answer
Some people report situations in which they were injured but didn't feel any pain until they...
Some people report situations in which they were injured but didn't feel any pain until they became aware of their injury. How would you explain this kind of situation in terms of top-down and bottom-up processing?...
1 answer
Horse has devery equipment that cost $4,600 and has been derde 523.500 wh i te Dot...
horse has devery equipment that cost $4,600 and has been derde 523.500 wh i te Dot y . I try to cry for the resenter for the Debit Credit No. Account Titles and Explanation (a)...
1 answer
Synthesize the following diketone. All carbons in the product must come originally from molecules of methanol....
Synthesize the following diketone. All carbons in the product must come originally from molecules of methanol. CH OH...
1 answer
Write a rate law for the reaction. The graph below shows a plot of the rate...
Write a rate law for the reaction. The graph below shows a plot of the rate of a reaction versus the concentration of the reactant A for the reaction A products (Figure 1). Rate = k Rate = k[A] Rate = k [A] Rate = k [A] Submit Previous Answers ✓ Correct Figure Part C < 1 of 1 > Estimate...
1 answer
Event 1: Additional equipment costing $867 was acquired by paying $243 and financing the balance by...
Event 1: Additional equipment costing $867 was acquired by paying $243 and financing the balance by increasing the existing loan. Does this mean cash decreases by $243, PPE increases by $867 and borrowings increases by $624 (positive $624)?...
1 answer
How do you express the sequence below as a recursively defined function 4, 11, 25, 53, 109,...?
How do you express the sequence below as a recursively defined function 4, 11, 25, 53, 109,...?...
1 answer
On 1/1/13, Dillard sold 500, $1,000 face 6% bonds, interest paid semi-annually on 7/1 and 12/31...
On 1/1/13, Dillard sold 500, $1,000 face 6% bonds, interest paid semi-annually on 7/1 and 12/31 with a maturity term of 15 years. The selling price was $454,020. The effective interest method is appropriate. What is the carrying value at 12/31/19? Also include Journal Entries for all transactions....
1 answer
Q2: Design and sketch with using excel an overflow spillway section for a design discharge of...
Q2: Design and sketch with using excel an overflow spillway section for a design discharge of 1500 m3/sec. The upstream water surface level is at elevation 240 m and the upstream channel floor is at 200 m. The spillway, having a vertical face, is 50 m long....
1 answer
Suppose there is a new medication called 'Uridol used for treating urinary tract infections that is...
Suppose there is a new medication called 'Uridol used for treating urinary tract infections that is taken orally. This means that Uridol: Select one a. The drug is absorbed 100% before it arrives in the small intestine b. The drug tastes good C. The drug is absorbed in the Gl tract and is not fu...
1 answer
Solve without using the ideal gas law Two liters of the known carcinogen, carbon tetrachloride (CCU),...
Solve without using the ideal gas law Two liters of the known carcinogen, carbon tetrachloride (CCU), are spilled into a room (100-m times 200-m times 50-m). Determine the equilibrium concentration of CCU in the air at 22 Degree C. For CC_4: P Degree = 0.130 atm, p = 1.59 g/mL, Henry's Law Coeff...
1 answer
Homework: Lecture 7 core: 0.17 of 1 pt 5 of 5 (3 HW Score: 58.42%, 5.26...
Homework: Lecture 7 core: 0.17 of 1 pt 5 of 5 (3 HW Score: 58.42%, 5.26 of 9 pts 7.3.13-T 190 students is taken. Assume that the students have no ability to distinguish between the two brands. Complete (a) through (d) below. percentage. (Round to the one decimal place as needed.)...
1 answer
Work out all the algebra in solving for Yp(x) in the equation below. Keep in mind...
Work out all the algebra in solving for Yp(x) in the equation below. Keep in mind that the two right hand side terms in equation A are products when you demonstrate that equation B and C are correct. Once completed, work out the algebra to get to equation D. Yp′′ − 3Yp′ &minu...
1 answer
A hollow, spherical shell with mass 2.00 kg rolls without slipping down a 33.0 slope. 1....
A hollow, spherical shell with mass 2.00 kg rolls without slipping down a 33.0 slope. 1. Find the acceleration. 2. Find the friction force. 3. Find the minimum coefficient of static friction needed to prevent slipping....
1 answer
Y (1 , xy) dx = (x + ²y ²) dy =
y (1 , xy) dx = (x + ²y ²) dy =...
1 answer
State wether true or false. no need to justify (a) If a sequence is divergent, then...
state wether true or false. no need to justify (a) If a sequence is divergent, then it contains two convergent subsequences with distinct limits. (b) If a function f is uniformly continuous on all real numbers, the f is continuous at each b in all real numbers. (c) If a function f^2 is continuous,...
1 answer
Assume a risk-free rate of interest of 4%, an expected rate of return on the market...
Assume a risk-free rate of interest of 4%, an expected rate of return on the market portfolio of 9% and a beta of 1.2 then the traditional domestic CAPM results in a cost of equity of...