bridge between Lua world and the .NET

一、新建项目:luademo

复制代码
安装包:<PackageReference Include="NLua" Version="1.7.3" />
cs 复制代码
using NLua;
using System;

namespace luademo
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Lua state = new Lua();
            for (int i = 0; i < 1000; i++)
            {
                state["x"] = i;
                var res = state.DoString("return 10 + x*(5 + 2)")[0];
                Console.WriteLine(res);
            }
        }
    }
}
相关推荐
怒放吧德德3 小时前
Spring Boot 实战:RSA+AES 接口全链路加解密(防篡改 / 防重放)
java·spring boot·后端
郑州光合科技余经理6 小时前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
feifeigo1237 小时前
matlab画图工具
开发语言·matlab
大大水瓶7 小时前
Tomcat
java·tomcat
dustcell.7 小时前
haproxy七层代理
java·开发语言·前端
norlan_jame7 小时前
C-PHY与D-PHY差异
c语言·开发语言
游离态指针7 小时前
以为发消息=下单成功?RabbitMQ从0到秒杀实战的完整踩坑笔记
java
多恩Stone7 小时前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc
BD_Marathon7 小时前
工厂方法模式
android·java·工厂方法模式
QQ4022054968 小时前
Python+django+vue3预制菜半成品配菜平台
开发语言·python·django