forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rpetrusha
committed
Dec 13, 2016
1 parent
25164fa
commit efa646a
Showing
10 changed files
with
208 additions
and
256 deletions.
There are no files selected for viewing
Binary file modified
BIN
-13.3 KB
(51%)
docs/csharp/programming-guide/classes-and-structs/media/class_inheritance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// <Snippet1> | ||
using System; | ||
|
||
public class A | ||
{ | ||
private int value = 10; | ||
|
||
public class B : A | ||
{ | ||
public int GetValue() | ||
{ | ||
return this.value; | ||
} | ||
} | ||
} | ||
|
||
public class C : A | ||
{ | ||
// public int GetValue() | ||
// { | ||
// return this.value; | ||
// } | ||
} | ||
|
||
public class Example | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
var b = new A.B(); | ||
Console.WriteLine(b.GetValue()); | ||
} | ||
} | ||
// The example displays the following output: | ||
// 10 | ||
// </Snippet1> |
Oops, something went wrong.