# Boolean and to\_clr\_type

**URL:** <https://www.ruby-forum.com/t/boolean-and-to-clr-type/160195>\
**Category:** IronRuby\
**Created:** [February 12, 2009, 8:42pm UTC](https://www.ruby-forum.com/t/boolean-and-to-clr-type/160195 "2009-02-12T20:42:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/0ea827/32.png) [@reacher](https://www.ruby-forum.com/u/reacher)\
**Post date:** [February 12, 2009, 8:42pm UTC](https://www.ruby-forum.com/t/boolean-and-to-clr-type/160195/1 "2009-02-12T20:42:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![reacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/0ea827/32.png) [@reacher](https://www.ruby-forum.com/u/reacher)\
**Post date:** [February 12, 2009, 10:31pm UTC](https://www.ruby-forum.com/t/boolean-and-to-clr-type/160195/2 "2009-02-12T22:31:52Z")

</div>

self.dcPlaying.DataType = System::Boolean

---

<div class="post-metadata">

**Author:** ![reacher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/0ea827/32.png) [@reacher](https://www.ruby-forum.com/u/reacher)\
**Post date:** [February 13, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/boolean-and-to-clr-type/160195/3 "2009-02-13T14:19:48Z")

</div>

Well now I feel dumb 😛
