# How to use a template library class using rubyclr

**URL:** <https://www.ruby-forum.com/t/how-to-use-a-template-library-class-using-rubyclr/147794>\
**Category:** Ruby\
**Created:** [September 5, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/how-to-use-a-template-library-class-using-rubyclr/147794 "2008-09-05T15:20:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshad\_Wankhede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/82dd89/32.png) [@Harshad\_Wankhede](https://www.ruby-forum.com/u/Harshad_Wankhede)\
**Post date:** [September 5, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/how-to-use-a-template-library-class-using-rubyclr/147794/1 "2008-09-05T15:20:59Z")

</div>

Hi,  
I have a created a dll using c# .net. The dll contains a few function  
with accept template while execution.  
window.Get(SearchCriteria.ByText(“buttonname”))  
Where Button is the template which is to be passed to get the button  
object  
Following is the button definition

```
 public virtual T Get<T>(SearchCriteria searchCriteria) where T : 

```

UIItem  
{  
return (T) Get(searchCriteria.AndControlType(typeof (T)));  
}

Where T is the template.

Does anyone know how to pass this template Button using ruby so that i  
can access the dll using ruby.

-Harshad
