Skip to content

Instantly share code, notes, and snippets.

@crgrieve
Created December 12, 2020 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crgrieve/4f7cca877ebdf89036597ee78762e189 to your computer and use it in GitHub Desktop.
Save crgrieve/4f7cca877ebdf89036597ee78762e189 to your computer and use it in GitHub Desktop.
Top Level Program with class
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