public static CodeMemberOperatorOverride Operator <T>( CodeTypeReference returnType, Expression <Func <T, OperatorType> > paramsAndType, params CodeStatement[] statements) { CodeParameterDeclarationExpressionCollection pars = new CodeParameterDeclarationExpressionCollection(); var c = new CodeMemberOperatorOverride( CodeDom.GetMethodName <OperatorType>(paramsAndType, pars), pars.ToArray(), returnType, statements); return(c); }