mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-16 15:03:50 -08:00
Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
This commit is contained in:
29
83_Stock_Market/csharp/src/Company.cs
Normal file
29
83_Stock_Market/csharp/src/Company.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user