Lua调用微软DotNet framework

-- http://penlight.luaforge.net/packages/LuaInterface/

require "CLRPackage"
import "System.Threading"
import "System.Console"
import "System.Math"
import "System.Timers"


-- http://msdn.microsoft.com/zh-cn/library/system.math.aspx
Console.WriteLine("Sqrt(99) " .. Math.Sqrt(99))

Console.WriteLine("Log10(51234) " .. Math.Log10(51234))

Thread.Sleep(1000)

 

    import "System.Windows.Forms"
    import "System.Drawing"

    button = Button()
    button.Text = "Click!"
    button.Dock = DockStyle.Top
    edit = RichTextBox()
    edit.Dock = DockStyle.Fill

    form = Form()
    form.Text = "Hello, World!"
    form.Controls:Add(edit)
    form.Controls:Add(button)
    form:ShowDialog()

你可能感兴趣的:(thread,.net,windows,Microsoft,lua)