You can find your answer here in msdn:
scroll down to the C # example (CodeDomGenericsDemo).
The general method is generated:
public virtual void Print<S, T>()
where S : new()
{
Console.WriteLine(default(T));
Console.WriteLine(default(S));
}
and then executed in the following example:
dict.Print<decimal, int>();
Code to generate a method call:
methodMain.Statements.Add(new CodeExpressionStatement(
new CodeMethodInvokeExpression(
new CodeMethodReferenceExpression(
new CodeVariableReferenceExpression("dict"),
"Print",
new CodeTypeReference[] {
new CodeTypeReference("System.Decimal"),
new CodeTypeReference("System.Int32"),}),
new CodeExpression[0])));
( CodeThisReferenceExpression() CodeBaseReferenceExpression() CodeVariableReferenceExpression), , , .