📄 utilities.cs
字号:
using System;
namespace WATestPGB
{
/// <summary>
/// This class provides some basic functionality needed in the controls
/// </summary>
public class Utilities
{
/// <summary>
/// Default constructor
/// </summary>
public Utilities()
{
// No initialization needed
}
/// <summary>
/// Add method (standard mathematical operation, used in NumberPicker)
/// </summary>
/// <param name="x">First parameter</param>
/// <param name="y">Second parameter</param>
/// <returns>The result of adding the first parameter to the second one</returns>
public static double Add(double x, double y)
{
return x+y;
}
/// <summary>
/// Substract method (standard mathematical operation, used in
/// NumberPicker)
/// </summary>
/// <param name="x">First parameter</param>
/// <param name="y">Second parameter</param>
/// <returns>The result of substracting the second parameter from the first one</returns>
public static double Substract(double x, double y)
{
return x-y;
}
/// <summary>
/// Divide method (standard mathematical operation, used in
/// NumberPicker)
/// </summary>
/// <param name="x">First parameter</param>
/// <param name="y">Second parameter</param>
/// <returns>The result of dividing the first parameter by the second one</returns>
public static double Divide(double x, double y)
{
return x/y;
}
/// <summary>
/// Multiply method (standard mathematical operation, used in
/// NumberPicker)
/// </summary>
/// <param name="x">First parameter</param>
/// <param name="y">Second parameter</param>
/// <returns>The result of multiplying the first parameter to the second one</returns>
public static double Multiply(double x, double y)
{
return x*y;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -