P
P
ProblemBook.NET
Search…
P
P
ProblemBook.NET
ProblemBook.NET
LANGS
Задачник.NET
ProblemBook.NET
Oop
“OverloadResolutionInheritance” (Solution)
“InheritanceNestedClass” (Solution)
“OverloadResolutionInheritance” (Problem)
“InheritanceNestedClass” (Problem)
“OverloadResolutionOverride” (Solution)
“OverloadResolutionOverride” (Problem)
“StaticFieldInGenericType” (Solution)
“OverloadResolutionBasic” (Solution)
“StaticFieldInGenericType” (Problem)
“OverloadResolutionBasic” (Problem)
Strings
Linq
Multithreading
ValueTypes
Math
Summary
Introduction
Attribution-NonCommercial-NoDerivatives 4.0 International
Powered By
GitBook
“InheritanceNestedClass” (Problem)
What will the following code display?
1
class
Foo
2
{
3
protected
class
Quux
4
{
5
public
Quux
()
6
{
7
Console
.
WriteLine
(
"Foo.Quux()"
);
8
}
9
}
10
}
11
class
Bar
:
Foo
12
{
13
new
class
Quux
14
{
15
public
Quux
()
16
{
17
Console
.
WriteLine
(
"Bar.Quux()"
);
18
}
19
}
20
}
21
class
Baz
:
Bar
22
{
23
public
Baz
()
24
{
25
new
Quux
();
26
}
27
}
28
void
Main
()
29
{
30
new
Baz
();
31
}
Copied!
Solution
Previous
“OverloadResolutionInheritance” (Problem)
Next
“OverloadResolutionOverride” (Solution)
Last modified
3yr ago
Copy link