本文整理汇总了C#中User.Compute方法的典型用法代码示例。如果您正苦于以下问题:C# User.Compute方法的具体用法?C# User.Compute怎么用?C# User.Compute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User
的用法示例。
在下文中一共展示了User.Compute方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculatorExample
private static void CalculatorExample()
{
var user = new User();
user.Compute('+', 100);
user.Compute('-', 50);
user.Compute('*', 10);
user.Compute('/', 2);
user.Undo(4);
user.Redo(3);
}
示例2: Main
internal static void Main()
{
var user = new User();
user.Compute('+', 100);
user.Compute('-', 50);
user.Compute('*', 10);
user.Compute('/', 2);
user.Undo(4);
user.Redo(3);
}
示例3: Demo
/// <summary>
/// Entry point into console application.
/// </summary>
static void Demo()
{
// Create user and let her compute
User user = new User();
// User presses calculator buttons
user.Compute('+', 100);
user.Compute('-', 50);
user.Compute('*', 10);
user.Compute('/', 2);
// Undo 4 commands
user.Undo(4);
// Redo 3 commands
user.Redo(3);
// Wait for user
Console.ReadKey();
}
示例4: Main
static void Main(string[] args)
{
//Create user and let her compute
User user = new User();
//user presses calculator buttons
user.Compute('+',100);
user.Compute('-', 50);
user.Compute('*', 10);
user.Compute('/', 2);
//undo all 4 commands
user.Undo(4);
//redo 3 commands
user.Redo(3);
//wait for user
Console.ReadKey(true);
}
示例5: Main
public static void Main( string[] args )
{
// Create user and let her compute
User user = new User();
user.Compute( '+', 100 );
user.Compute( '-', 50 );
user.Compute( '*', 10 );
user.Compute( '/', 2 );
// Undo and then redo some commands
user.Undo( 4 );
user.Redo( 3 );
}