-
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
Showing
3 changed files
with
27 additions
and
31 deletions.
There are no files selected for viewing
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,20 @@ | ||
using System.Threading.Channels; | ||
|
||
namespace DomeTrain | ||
{ | ||
public class Base | ||
{ | ||
// public virtual void Print(string text); | ||
|
||
public virtual void PrintConsole() => Console.WriteLine("Base class method."); | ||
} | ||
|
||
public class Instance : Base | ||
{ | ||
public void PrintConsoleBase() => base.PrintConsole(); | ||
|
||
// public override void PrintConsole() => base.PrintConsole(); | ||
|
||
public override void PrintConsole() => Console.WriteLine("Derived class method."); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,17 @@ | ||
namespace DomeTrain | ||
using System.IO.Compression; | ||
|
||
namespace DomeTrain | ||
{ | ||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
Instance r = new(); | ||
|
||
var VT = (1, 2, 3, 4, 5, "RE", 'E', true, 1.2, 1.3f); | ||
|
||
|
||
List<int> nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]; | ||
|
||
var (_, max) = MinMax(nums); | ||
r.PrintConsoleBase(); | ||
r.PrintConsole(); | ||
|
||
Console.WriteLine(max); | ||
|
||
Console.WriteLine(r is Base); | ||
} | ||
|
||
private static (int Min, int Max) MinMax(List<int> nums) => (nums.Min(), nums.Max()); | ||
|
||
} | ||
} |