Files
basic-computer-games/84_Super_Star_Trek/csharp/Commands/CommandExtensions.cs
Chris Reuter d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00

15 lines
383 B
C#

using System.Reflection;
using System.ComponentModel;
namespace SuperStarTrek.Commands
{
internal static class CommandExtensions
{
internal static string GetDescription(this Command command) =>
typeof(Command)
.GetField(command.ToString())
.GetCustomAttribute<DescriptionAttribute>()
.Description;
}
}