# code-block-pro/1.27.3/build/shiki/samples/razor.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.3. 26 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.3/code/build/shiki/samples/razor.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.3/raw/build/shiki/samples/razor.sample
- Modified: 2023-09-03T01:04:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.3/code/build/shiki/samples/razor.sample#L10-L20`.

```
@{
    string message = "foreignObject example with Scalable Vector Graphics (SVG)";
}

<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
    <rect x="0" y="0" rx="10" ry="10" width="200" height="200" stroke="black"
        fill="none" />
    <foreignObject x="20" y="20" width="160" height="160">
        <p>@message</p>
    </foreignObject>
</svg>

<!-- @do while -->

@{ var i = 0; }
@do
{
    var person = people[i];
    <p>Name: @person.Name</p>
    <p>Age: @person.Age</p>

    i++;
} while (i < people.Length);

<!-- From https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-7.0 -->

```
