Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
static void Main(string[] args) { CodeTypeDeclaration MyClass = Class("MyClass"); MyClass.Add(Method("StrLen", Type(typeof(int)))); TheMethod.Add(Parameter(typeof(string), "str")); TheMethod.Return(Expression("str.Length")); CSharpCodeProvider Provider = new CSharpCodeProvider(); Provider.GenerateCodeFromType(MyClass, Console.Out, new System.CodeDom.Compiler.CodeGeneratorOptions()); Console.ReadKey(); }