mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 14:25:37 +00:00
21 lines
482 B
C#
21 lines
482 B
C#
partial class Program
|
|
{
|
|
static void Output(string title, IEnumerable<string> collection)
|
|
{
|
|
WriteLine(title);
|
|
foreach (string item in collection)
|
|
{
|
|
WriteLine($" {item}");
|
|
}
|
|
}
|
|
|
|
static void OutputPQ<TElement, TPriority>(string title,
|
|
IEnumerable<(TElement Element, TPriority Priority)> collection)
|
|
{
|
|
WriteLine(title);
|
|
foreach ((TElement, TPriority) item in collection)
|
|
{
|
|
WriteLine($" {item.Item1}: {item.Item2}");
|
|
}
|
|
}
|
|
}
|