Excellent. This inspired me to dig further, and I succeeded with the
following:
CodeTypeDeclaration newClass = new CodeTypeDeclaration("MyCollectionClass");
newClass.BaseTypes.Add( new CodeTypeReference("Collection",
new CodeTypeReference[] {
new
CodeTypeReference("MyBaseClass")
}));
// This results in code like:
public class MyCollectionClass : Collection<MyBaseClass>
{
//woo hoo!
}
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
Mark,
Check the TypeParameters property of the CodeTypeDeclaration class.
It represents the type parameters that the type has. I'm pretty sure that
your method declaration class instance has the same property exposed as well.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Mark" <fi******@idonotlikejunkmail.umn.edu> wrote in message
news:Ok**************@TK2MSFTNGP14.phx.gbl... I'm looking at the CodeDom namespace in .NET 2.0 class library online
(http://msdn2.microsoft.com/library/za6cc751.aspx). I'm not seeing any
class that would allow me to create Generics. Any suggestions?
Thanks in advance.
Mark