Skip to content

Modified listing to include aliasing any type example #558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added example of aliasing a tuple.
  • Loading branch information
MarkMichaelis committed Sep 24, 2023
commit 784877821ad57d28de093de1930f40fae1b2195f
6 changes: 6 additions & 0 deletions src/Chapter05/Listing05.14.DeclaringATypeAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter05.Listing05_14;
#region INCLUDE
#region HIGHLIGHT
using CountDownTimer = System.Timers.Timer;
#if NET8_0_OR_GREATER // EXCLUDE
using StartStop = (DateTime Start, DateTime Stop);
#endif // NET8_0_OR_GREATER // EXCLUDE
#endregion HIGHLIGHT

public class HelloWorld
Expand All @@ -12,6 +15,9 @@ public static void Main()
{
#region HIGHLIGHT
CountDownTimer timer;
#if NET8_0_OR_GREATER // EXCLUDE
StartStop startStop;
#endif // NET8_0_OR_GREATER // EXCLUDE
#endregion HIGHLIGHT

// ...
Expand Down