Generate code from string parameter

QueenZoolander

New Member
I have class a called TemplateIn the class I have the method \[code\]Render(string)\[/code\];I must send data to this method template, for example, I sent:\[code\]<% for ( int i = 0; i < 5; i++ ) { Console.WriteLine("*") } %> \[/code\]Method Render get this string and write * on my cmdI need to say, that I can declare local variables, cycles and other syntax of language C# in such way ( <% %> )Please, tell me, how can I do this?
 
Back
Top