Created
December 12, 2020 13:43
-
-
Save crgrieve/4f7cca877ebdf89036597ee78762e189 to your computer and use it in GitHub Desktop.
Top Level Program with class
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
using System; | |
var glasgowMeetup = new Meetup("Glasgow", "Umbraco"); | |
Console.WriteLine(GetMessage(glasgowMeetup)); | |
string GetMessage(Meetup meetup) | |
{ | |
return String.Format("Welcome to the {0} {1} meetup!", meetup.City, meetup.Topic); | |
} | |
public class Meetup { | |
public Meetup(string city, string topic) | |
{ | |
City = city; | |
Topic = topic; | |
} | |
public string City { get; init; } | |
public string Topic { get; init; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment