mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
22 lines
482 B
C#
22 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}");
|
|
}
|
|
}
|
|
}
|