Commit d9b412fb authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Update README.md

parent 552e4093
...@@ -22,23 +22,34 @@ iOS : [![Build Status](http://jenkins-nlua.sytes.net:8080/job/NLua_iOS/badge/ic ...@@ -22,23 +22,34 @@ iOS : [![Build Status](http://jenkins-nlua.sytes.net:8080/job/NLua_iOS/badge/ic
[4]: http://nvlabs.github.com/cub/download-icon.png (Download for iOS) [4]: http://nvlabs.github.com/cub/download-icon.png (Download for iOS)
```csharp ```csharp
string url = @"http://raw.github.com/NLua/NLua/master/README.md";
string script = @" string script = @"
luanet.load_assembly ('System.dll') local s = Scriptable (""My String Parameter"")
WebClient = luanet.import_type ('System.Net.WebClient') s:DoSomething ()
local client = WebClient ()
print (s.Param1)
local ret = client:DownloadString (url);
local ret = s:SumOfLengths (""Name"", 10);
return ret;
"; print (tostring(ret))
Scriptable.Print(""Hello NLua"")
s.Param3 = 0.5;
local p2 = tostring(s.Param3)
print (p2)
";
using (Lua lua = new Lua ()) { using (Lua lua = new Lua ()) {
lua ["url"] = url; lua.LoadCLRPackage ();
lua.DoString (@" import ('NLuaSample') ");
lua ["gValue"] = "This is a global value"; // You can set a global value.
var returns = lua.DoString (script); var returns = lua.DoString (script);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment