Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # IT:AD:Transformations:T4:Syntax:CodeBlocks # * [[../|(UP)]] {{indexmenu>.#2|nsort tsort}} ## Code Blocks ## Think of a *.tt file just as an *.aspx file...stuff that is written in between special angled brackets are evaluated, and stuff in between them is outputted with no transformation. <# ... #> There are different types of of blocks. For an `expression block`, add an equals sign: <#= ... #> Helper methods are defined in `class feature blocks`: <#+ // Class feature block private void WriteSquareLine(int i) { #> The square of <#= i #> is <#= i*i #>. <# } #> >Note how the last bracket doesn't need special closure (it knows end of class scope by the content's code/bracket closure). /home/skysigal/public_html/data/pages/it/ad/t4/syntax/codeblocks.txt Last modified: 2023/11/04 23:03by 127.0.0.1