You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE-2.01/MCTG/Model/PreparationStep.cs

46 lines
1009 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class PreparationStep
{
#region Attributes
private string? _description;
#endregion
#region Properties
public int Order { get; init; }
public string? Description
{
get => _description;
set
{
if (string.IsNullOrWhiteSpace(value))
_description = "No description.";
else
_description = value;
}
}
#endregion
#region Constructors
public PreparationStep(int order, string? description)
{
Order = order;
Description = description;
}
#endregion
#region Methods
public override string ToString()
{
return $"{Order}- {Description}";
}
#endregion
}
}