Ivan, <br><br>In this case you actually can&#39;t do foo =&nbsp;x::y::z::Foo.new(1) because IronRuby doesn&#39;t support lowercase namespace.&nbsp; It think it&#39;s a method call.<br><br>That&#39;s why I started out <br>Foo = Type.get_type(&quot;x.y.z.Foo, MyAssembly, Version=<a href="http://1.0.0.0/" target="_blank">1.0.0.0</a>, Culture=neutral, PublicKeyToken=null&quot;, true).to_class<br>
<br>Aaron<br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 4:52 PM, Ivan Porto Carrero <span dir="ltr">&lt;<a href="mailto:ivan@flanders.co.nz">ivan@flanders.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Normally&nbsp;</div><div>foo =&nbsp;x::y::z::Foo.new(1)</div><div><br></div>in the console you need to use global variables:<div>$foo = x::y::z::Foo.new(1)<div><div></div><div class="Wj3C7c"><br clear="all"><br><br><div class="gmail_quote">
On Mon, Dec 8, 2008 at 10:43 PM, Aaron Feng <span dir="ltr">&lt;<a href="mailto:aaron.feng@gmail.com" target="_blank">aaron.feng@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I tried to load the struct the same way, but I don&#39;t know how to set the value of it.&nbsp; For example:<br>
<br>C#<br><br>
namespace x.y.z {<br>&nbsp;&nbsp;&nbsp; public struct Foo {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public long Bar;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public Foo(long bar) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this.Bar = bar;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>var foo = new x.y.z.Foo(1);<br><br>IronRuby<br><br>Foo = Type.get_type(&quot;x.y.z.Foo, MyAssembly, Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral, PublicKeyToken=null&quot;, true).to_class<br>


<br># how do I do the equivalent of <br># var foo = new x.y.z.Foo(1); ? <br><br>Aaron<br><br><br><div class="gmail_quote">On Mon, Dec 8, 2008 at 3:45 PM, Tomas Matousek <span dir="ltr">&lt;<a href="mailto:Tomas.Matousek@microsoft.com" target="_blank">Tomas.Matousek@microsoft.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">You can use Assembly.LoadFile and point it to an absolute path
instead.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Tomas</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>
[mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Aaron Feng<br>
<b>Sent:</b> Monday, December 08, 2008 12:33 PM<div><div></div><div><br>
<b>To:</b> <a href="mailto:ironruby-core@rubyforge.org" target="_blank">ironruby-core@rubyforge.org</a><br>
<b>Subject:</b> Re: [Ironruby-core] Handling C# lower case namespaces</div></div></span></p>

</div><div><div></div><div><div>

<p>&nbsp;</p>

<p style="margin-bottom: 12pt;"><span style="color: black;">Ok,&nbsp;
I got </span><span style="font-size: 11pt; color: black;">Assembly.Load and
Type.get_type both to work with my own DLL.&nbsp; The actual DLL have to live
where ir.exe lives.&nbsp; Is there a way for it to look in the directory of the
ruby file?&nbsp; Like the way require statement work.<br>
<br>
Aaron<br>
</span><span style="font-size: 11pt; color: rgb(31, 73, 125);"><br>
<br>
</span></p>

</div><div>

<p>On Mon, Dec 8, 2008 at 2:11 PM, Tomas Matousek &lt;<a href="mailto:Tomas.Matousek@microsoft.com" target="_blank">Tomas.Matousek@microsoft.com</a>&gt;
wrote:</p>

<div>

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Can you load the assembly and
get the type explicitly?</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">require &#39;mscorlib&#39;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">System::Reflection::Assembly.Load(&quot;IronNails.Library,
Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral,
PublicKeyToken=null&quot;).GetType(</span>&#39;IronNails.View.XamlProxy&#39;)</p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Tomas</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>
[mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>]
<b>On Behalf Of </b>Ivan Porto Carrero<br>
<b>Sent:</b> Monday, December 08, 2008 9:46 AM</span></p>

<div>

<p><span style="font-size: 10pt;"><br>
<b>To:</b> <a href="mailto:ironruby-core@rubyforge.org" target="_blank">ironruby-core@rubyforge.org</a></span></p>

</div>

<p><b><span style="font-size: 10pt;">Subject:</span></b><span style="font-size: 10pt;"> Re: [Ironruby-core] Handling C# lower case namespaces</span></p>

</div>

<div>

<div>

<p>&nbsp;</p>

<p style="margin-bottom: 12pt;">I get the same behavior.<br>
I can load types from the CLR but not from my own assembly.<br>
<br>
I copied my assembly into the folder that contains ir.exe<br>
<br>
&gt;&gt;&gt; require &#39;mscorlib&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; require &#39;IronNails.Library, Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral, PublicKeyToken=null&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; IronNails::View::XamlProxy<br>
=&gt; IronNails::View::XamlProxy<br>
&gt;&gt;&gt; System::Type.get_type &#39;IronNails.View.XamlProxy&#39;<br>
=&gt; nil<br>
&gt;&gt;&gt; System::Type.get_type &#39;System.String&#39;<br>
=&gt; #&lt;System::RuntimeType:0x000005c&gt;<br>
&gt;&gt;&gt; IronNails::View::XamlProxy.to_clr_type<br>
=&gt; #&lt;System::RuntimeType:0x000005e&gt;<br clear="all">
<br>
<br>
</p>

<div>

<p>On Mon, Dec 8, 2008 at 5:54 PM, Aaron Feng &lt;<a href="mailto:aaron.feng@gmail.com" target="_blank">aaron.feng@gmail.com</a>&gt;
wrote:</p>

<p style="margin-bottom: 12pt;">Tomas,<br>
<br>
I tried it again.&nbsp; I couldn&#39;t get the following to work with my own DLL
even If I capitalize the namespace (It does work fine with build in types like
System.String):<br>
<br>
&gt; <span style="font-size: 11pt; color: rgb(31, 73, 125);">System::Type.get_type(&quot;Abc.Hi,
Version=<a href="http://1.0.0.0" target="_blank">1.0.0.0</a>, Culture=neutral,
PublicKeyToken=null&quot;)<br>
<br>
</span>Do I have any other options?<br>
<br>
Thanks,</p><div><br>
<span style="color: rgb(136, 136, 136);"><br>
Aaron<br>
</span><br>
_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a></div><p></p>

</div>

<p>&nbsp;</p>

</div>

</div>

</div>

</div><div>

<p style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a></p>

</div></div>

<p>&nbsp;</p>

</div></div></div>

</div><div>


<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br>