C# and WPF tutorial files
This commit is contained in:
52
C# Beginners/BasicCalculator/Operation.cs
Normal file
52
C# Beginners/BasicCalculator/Operation.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BasicCalculator
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information about a single calculator operation
|
||||
/// </summary>
|
||||
public class Operation
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// The left side of the operation
|
||||
/// </summary>
|
||||
public string LeftSide { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The right side of the operation
|
||||
/// </summary>
|
||||
public string RightSide { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of operation to perform
|
||||
/// </summary>
|
||||
public OperationType OperationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The inner operation to be performed initially before this operation
|
||||
/// </summary>
|
||||
public Operation InnerOperation { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public Operation()
|
||||
{
|
||||
// Create empty strings instead of having nulls
|
||||
this.LeftSide = string.Empty;
|
||||
this.RightSide = string.Empty;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user