<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=NeoLua%E3%81%AB.NET%E3%81%A7%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B</id>
	<title>NeoLuaに.NETでクラスを追加する - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=NeoLua%E3%81%AB.NET%E3%81%A7%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=NeoLua%E3%81%AB.NET%E3%81%A7%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B&amp;action=history"/>
	<updated>2026-06-05T01:50:40Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=NeoLua%E3%81%AB.NET%E3%81%A7%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B&amp;diff=10379&amp;oldid=prev</id>
		<title>imported&gt;Administrator: ページの作成:「 NeoLuaにC#で関数を追加する方法と同じ要領で、NeoLuaに.NETのクラスも追加できる。  &lt;syntaxhighlight lang=&quot;csharp&quot;&gt;     class MainClass     {...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=NeoLua%E3%81%AB.NET%E3%81%A7%E3%82%AF%E3%83%A9%E3%82%B9%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B&amp;diff=10379&amp;oldid=prev"/>
		<updated>2018-10-22T02:30:40Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「 NeoLuaにC#で関数を追加する方法と同じ要領で、NeoLuaに.NETのクラスも追加できる。  &amp;lt;syntaxhighlight lang=&amp;quot;csharp&amp;quot;&amp;gt;     class MainClass     {...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
NeoLuaにC#で関数を追加する方法と同じ要領で、NeoLuaに.NETのクラスも追加できる。&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
    class MainClass&lt;br /&gt;
    {&lt;br /&gt;
        public static void Main(string[] args)&lt;br /&gt;
        {&lt;br /&gt;
            using (var lua = new Lua())&lt;br /&gt;
            {&lt;br /&gt;
                var env = lua.CreateEnvironment();&lt;br /&gt;
&lt;br /&gt;
                // C#で書かれたfooオブジェクトを追加&lt;br /&gt;
                env.Add(&amp;quot;foo&amp;quot;, new Foo());&lt;br /&gt;
&lt;br /&gt;
                // Lua側から呼び出してみる&lt;br /&gt;
                var ret = env.DoChunk(@&amp;quot;return foo:ticks()&amp;quot;, &amp;quot;main.lua&amp;quot;);&lt;br /&gt;
                Console.WriteLine(ret);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    class Foo &lt;br /&gt;
    {&lt;br /&gt;
        public long ticks() &lt;br /&gt;
        {&lt;br /&gt;
            return DateTime.Now.Ticks;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 関連項目 ==&lt;br /&gt;
* [[NeoLuaに.NETで関数を追加する]]&lt;br /&gt;
&lt;br /&gt;
[[category: NeoLua]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
</feed>