Find the error of the following code segment.

```
void G()
{
Console.WriteLine("Inside method G");
void H()
{
Console.WriteLine("Inside method H");
}
}
```


Error: Method H is declared within method G.
Correction: Move the declaration of H outside the declaration of G.

Computer Science & Information Technology

You might also like to view...

Write multiway if-else statements in which letter grades are assigned based a numeric grade based on this “ten point” scheme: if the numeric grade is not less than 90, the letter grade is an A, if the numeric grade is not less than 80, the letter grade is a B, if the numeric grade is not less than 70, the letter grade is C, if the numeric grade is not less than 60, the letter grade is D, otherwise the letter grade is F.

What will be an ideal response?

Computer Science & Information Technology

Note that the Unicode for character A is 65. The expression "A" + 1 evaluates to ________.

a. 66 b. B c. A1 d. Illegal expression

Computer Science & Information Technology

The item marked 4 in the accompanying figure is the ____ button.

A. Swatches B. Swap colors C. Strokes D. Fills

Computer Science & Information Technology

The program that enables another program to run within Internet Explorer is called a(n):

A) script B) ActiveX control C) keystroke logger D) patch

Computer Science & Information Technology