S
Steve K.
I know this code is garbage but it should give you an idea of what I'm
after:
<code>
class Test
{
Type _t = null;
public void SetSourceList<T>(Dictionary<string, T> sourceList)
{
_t = typeof(T);
}
public _t DoSomething()
{
return default(_t);
}
}
</code>
Basically I've got two related methods of a class that I want to be generic
and I don't want to make the whole class generic.
Anyway to accomplish what I'm after? I've been reading:
http://msdn2.microsoft.com/en-us/library/system.type.makegenerictype(vs.80).aspx
But it's not sinking in too well, maybe I need to get some rest ;0)
-Steve
after:
<code>
class Test
{
Type _t = null;
public void SetSourceList<T>(Dictionary<string, T> sourceList)
{
_t = typeof(T);
}
public _t DoSomething()
{
return default(_t);
}
}
</code>
Basically I've got two related methods of a class that I want to be generic
and I don't want to make the whole class generic.
Anyway to accomplish what I'm after? I've been reading:
http://msdn2.microsoft.com/en-us/library/system.type.makegenerictype(vs.80).aspx
But it's not sinking in too well, maybe I need to get some rest ;0)
-Steve