Forum: IronRuby boolean and to_clr_type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C0f75c054e0191ad24dd655b2e1b4532?d=identicon&s=25 Brandon Jones (reacher)
on 2009-02-12 20:42
I'm working with a windows form application using IronRuby. I'm hitting
a snag when using DataSets. I have a DataColumn that I want to be a
boolean. But I can't figure out how to set the DataType properly.
Numerics are easy enough:

self.dcScore.DataType = Fixnum.to_clr_type
self.dcTime.DataType = Float.to_clr_type
self.dcPlaying.DataType = ???

TrueClass and FalseClass have no CLR type (that I can see).  Must I hack
in integer values in place of true/false?
1e39a948a58f4569c53d971c2e120920?d=identicon&s=25 Ivan Porto carrero (casualjim)
on 2009-02-12 22:31
(Received via mailing list)
self.dcPlaying.DataType = System::Boolean
C0f75c054e0191ad24dd655b2e1b4532?d=identicon&s=25 Brandon Jones (reacher)
on 2009-02-13 14:19
Well now I feel dumb :p
This topic is locked and can not be replied to.