Files
basic-computer-games/83_Stock_Market/csharp/src/Company.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

30 lines
787 B
C#

namespace Game
{
/// <summary>
/// Represents a company.
/// </summary>
public record Company
{
/// <summary>
/// Gets the company's name.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the company's three letter stock symbol.
/// </summary>
public string StockSymbol { get; }
/// <summary>
/// Gets the company's current share price.
/// </summary>
public double SharePrice { get; init; }
/// <summary>
/// Initializes a new Company record.
/// </summary>
public Company(string name, string stockSymbol, double sharePrice) =>
(Name, StockSymbol, SharePrice) = (name, stockSymbol, sharePrice);
}
}