// This could be any .NET object, from BCL or from your assemblies
```
Using .NET assemblies inside Lua:
To acccess any .NET assembly to create objects, events etc inside Lua you need to ask NLua to use CLR as a Lua package.
To access any .NET assembly to create objects, events etc inside Lua you need to ask NLua to use CLR as a Lua package.
To do this just use the method `LoadCLRPackage` and use the `import` function inside your Lua script to load the Assembly.
```csharp
...
...
@@ -160,6 +160,16 @@ To do this just use the method `LoadCLRPackage` and use the `import` function in
// import will load any .NET assembly and they will be available inside the Lua context.
```
Creating .NET objects:
To create object you only need to use the class name with the `()`.
```csharp
state.DoString(@"
obj2 = SomeClass() -- you can suppress default values.
client = WebClient()
");
```
Calling instance methods:
To call instance methods you need to use the `:` notation, you can call methods from objects passed to Lua or to objects created inside the Lua context.