| 1 | <h2>Full example</h2> |
| 2 | <pre><code><#@ template hostspecific="false" language="C#" #> |
| 3 | <#@ assembly name="System.Core.dll" #> |
| 4 | <#@ output extension=".txt" #> |
| 5 | <# |
| 6 | using System.Collections.Generic; |
| 7 | |
| 8 | var numbers = new List<int> { 0, 1, 2, 3, 4, 5, 6, /* 7, */ 8, 9, 10 }; |
| 9 | |
| 10 | foreach (var i in numbers) |
| 11 | { |
| 12 | #> |
| 13 | The square of <#= i #> is <#= i * i #> |
| 14 | <# |
| 15 | } |
| 16 | #></code></pre> |