1、先创建一个项目,然后
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary2
{
public class Class1
{
public decimal Add(decimal x, decimal y)
{
long timer = System.DateTime.Now.Ticks;
int k = 0;
for (int i = 0; i < 100000000; i++)
{
k++;
}
long timer1 = System.DateTime.Now.Ticks;
Console.WriteLine(timer1 - timer);
return timer1 - timer;
}
public decimal SubTract(decimal x, decimal y)
{
return x - y;
}
public decimal Mul(decimal x, decimal y)
{
ret