RE: [Ikvm-developers] Enumerations with the FlagsAttribute set
Brought to you by:
jfrijters
|
From: Michael K. <mi...@sa...> - 2006-01-30 01:31:02
|
I think I've found the answer: CompareOptions options = CompareOptions.wrap(CompareOptions.IgnoreCase | CompareOptions.IgnoreSymbols); Michael Kay _____ From: ikv...@li... [mailto:ikv...@li...] On Behalf Of M. David Peterson Sent: 30 January 2006 01:22 To: Michael Kay Cc: ikv...@li... Subject: Re: [Ikvm-developers] Enumerations with the FlagsAttribute set Hey Dr. Kay, If I'm understanding your correctly this should set things up. CompareInfo myCInfo = CultureInfo.InvariantCulture.CompareInfo; Or am I misunderstanding? On 1/29/06, Michael Kay <mi...@sa...> wrote: I'm trying to call (from Java) one of the .NET System.Globalization.CompareInfo.Compare() methods that takes an argument of type CompareOptions. I can't see how to set up a CompareOptions instance to supply. This is an enumeration type with the FlagsAttribute set, and it seems from the examples that in C# it's done by creating an int with the right bits set, and then casting it to a CompareOptions. In Java, of course, no such cast is possible. At present the only way I can see of doing it is to create a wrapper class in C# that takes arguments of type int rather than CompareOptions. Is there a better way? Michael Kay http://www.saxonica.com/ ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642> &kid=103432&bid=230486&dat=121642 _______________________________________________ Ikvm-developers mailing list Ikv...@li... https://lists.sourceforge.net/lists/listinfo/ikvm-developers -- <M:D/> M. David Peterson http://www.xsltblog.com/ |