Lua 的 .NET 实现 NeoLua

码农软件 · 软件分类 · 脚本编程语言 · 2019-03-04 21:13:19

软件介绍

NeoLua 可以让你在 .NET 的应用中使用 Lua 语言或者反过来(当前支持的 Lua 版本是 5.2),其目的是遵循 C-Lua 实现并且合并完整的 .NET 框架支持。你可以很方便在 Lua 程序中调用 .NET 的 functions/classes/interfaces/events ,同时也可以轻松在 .NET 应用中调用 Lua 的变量和函数。

NeoLua 使用 C# 开发并使用 Dynamic Language Runtime. 目前 NeoLua 依赖于 .NET Framework 4,同时也支持当前版本的 Mono 框架。

示例代码:

using Neo.IronLua;

namespace Test
{
  public static class Program
  {
    public static void Main(string[] args)
    {
      // Create the Lua script engine
      using (Lua l = new Lua())
      {
        // create a Lua script environment (global)
        var g = l.CreateEnvironment();
        // run a chunk, first the code, than the name of the code
        g.DoChunk("print('Hello World!');", "test.lua");
      }
    }
  }
}

Nuget package: https://www.nuget.org/packages/NeoLua/

本文地址:https://www.codercto.com/soft/d/638.html

PHP Hacks

PHP Hacks

Jack Herrington D. / O'Reilly Media / 2005-12-19 / USD 29.95

Programmers love its flexibility and speed; designers love its accessibility and convenience. When it comes to creating web sites, the PHP scripting language is truly a red-hot property. In fact, PH......一起来看看 《PHP Hacks》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码