Advertisement

在Unity中使用DLL方法,并将DLL文件放置于项目中(三)

阅读量:

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)
{
return x * y;

全部评论 (0)

还没有任何评论哟~