RubyCLR - passing in a parameter of UInt16

B

bvanderw

I am trying to use RubyCLR to access an existing .NET assembly. When I
try to call a method that takes a UInt16 (a C# ushort) parameter, I get
a missing_method error, presumably from RubyCLR, because it can't match
the parameter signature. (FWIW, this particular method is overloaded.)

I've tried everything I know to try to work around this, but I am
stumped. How can I explicitly force a parameter of UInt16 (or Byte,
etc.)??

--Bruce
 
J

Justin Bailey

I've tried everything I know to try to work around this, but I am
stumped. How can I explicitly force a parameter of UInt16 (or Byte,
etc.)??

It's a bit of a hack, but I'd just use the System.Convert method that
NET already provides. You should be able to call it from Ruby and
pass the value returned to your assembly.

Justin
 
B

bvanderw

Justin - that's one of the things I tried, and it doesn't appear to
work. Thanks anyway!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,222
Messages
2,571,141
Members
47,756
Latest member
JulienneY0

Latest Threads

Top