<div>Hello</div>
<div> </div>
<div>   Thank you all for your help and I have to say that I am sorry also, I missed the other replies where you came right out and told me how to do it, for some reason I only saw the one that mapped the DateTime to the Time object, you all provided very good answers to my question and I really appreciate it.</div>

<div> </div>
<div>Patrick<br><br></div>
<div class="gmail_quote">On Fri, Nov 13, 2009 at 1:15 AM, Shay Friedman <span dir="ltr">&lt;<a href="mailto:shay.friedman@gmail.com">shay.friedman@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div dir="ltr">Hi Patrick,<br><br>Assuming you have the next C# class in C:\CustomAssembly.dll:<br>namespace ClassLibrary2<br>{<br>    public class Class1<br>    {<br>        public Class1(int a)<br>        {<br>            Console.WriteLine(a);<br>
        }<br>        public Class1(int a, string s)<br>        {<br>            Console.WriteLine(&quot;{0} and {1}&quot;,a,s);<br>        }<br>        public Class1(bool b)<br>        {<br>            Console.WriteLine(&quot;b = {0}&quot;,b);<br>
        }<br>    }<br>}<br><br>There are several constructors here. All you have to do to call a specific constructor via IronRuby, is to get the constructor method object (with clr_ctor like Tomas said), use the overload method to pick up the needed overload and call it.<br>
For example, the next IronRuby code executes all three constructors of the custom class above:<br>require &#39;c:\CustomAssembly.dll&#39;<br><br>include ClassLibrary2<br><br># Call Class1(int a) constructor:<br>Class1.clr_ctor.overload(System::Int32).call 1 <br>
# Prints &quot;1&quot;<br><br># Call Class1(int a, string s) constructor<br>Class1.clr_ctor.overload(System::Int32, System::String).call 1, &quot;yes&quot; <br># Prints &quot;1 and yes&quot;<br><br># Call Class1(bool b) constructor:<br>
Class1.clr_ctor.overload(System::Boolean).call true<br># Prints &quot;b = true&quot;<br><br>Hope it helps,<br>Shay.<br><font color="#888888"><br>-- <br>--------------------------------------------------<br>Shay Friedman<br>
Author of IronRuby Unleashed<br><a href="http://www.ironshay.com/" target="_blank">http://www.IronShay.com</a><br>Follow me: <a href="http://twitter.com/ironshay" target="_blank">http://twitter.com/ironshay</a></font> 
<div>
<div></div>
<div class="h5"><br><br>
<div class="gmail_quote">On Fri, Nov 13, 2009 at 4:18 AM, Patrick Brown <span dir="ltr">&lt;<a href="mailto:patrickcbrown@gmail.com" target="_blank">patrickcbrown@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi 
<div><br></div>
<div>   That is fine in this case, can you tell me, in cases where I can&#39;t fall back on a ruby class, is there a way to call an overloaded constructor?  Your reply makes me worry a bit more.</div>
<div><br></div>
<div>Thanks,</div>
<div>Patrick 
<div>
<div></div>
<div><br><br>
<div class="gmail_quote">On Thu, Nov 12, 2009 at 7:11 PM, Ivan Porto Carrero <span dir="ltr">&lt;<a href="mailto:ivan@flanders.co.nz" target="_blank">ivan@flanders.co.nz</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">But you can just use the ruby way and that is a lot less noisy 
<div><br></div>
<div>for a local time</div>
<div><br></div>
<div>Time.local 2009, 9, 28</div>
<div><a href="http://ruby-doc.org/core/classes/Time.html#M000254" target="_blank">http://ruby-doc.org/core/classes/Time.html#M000254</a></div>
<div><br></div>
<div>for utc</div>
<div>Time.utc 2009, 9, 29</div>
<div><a href="http://ruby-doc.org/core/classes/Time.html#M000252" target="_blank">http://ruby-doc.org/core/classes/Time.html#M000252</a></div>
<div><br></div>
<div>It still creates a System::DateTime underneath</div>
<div><br clear="all">---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz/" target="_blank">http://flanders.co.nz</a><br>Google Wave: <a href="mailto:portocarrero.ivan@googlewave.com" target="_blank">portocarrero.ivan@googlewave.com</a><br>
Twitter: <a href="http://twitter.com/casualjim" target="_blank">http://twitter.com/casualjim</a><br>Author of IronRuby in Action (<a href="http://manning.com/carrero" target="_blank">http://manning.com/carrero</a>)<br><br>
<br><br>
<div class="gmail_quote">
<div>
<div></div>
<div>On Fri, Nov 13, 2009 at 12:49 AM, Patrick Brown <span dir="ltr">&lt;<a href="mailto:patrickcbrown@gmail.com" target="_blank">patrickcbrown@gmail.com</a>&gt;</span> wrote:<br></div></div>
<blockquote style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div>
<div>Hi</div>
<div> </div>
<div>   Is there a way for me to call an overloaded constructor??  I want to say   date =  new DateTime(2009,9,28) using IronRuby 0.9.2.  I have been searching quite a bit and haven&#39;t seen anything so far.</div>
<div> </div>
<div>Thank you,</div>
<div>Patrick </div><br></div></div>_______________________________________________<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><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" 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><br clear="all"><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>