Global Variables in Razor View Engine

is there a way for me to use a functionality similar to what are called Global Variables in the Spark View Engine, but for Razor.

The point of it all lis to be able to define a variable in one section for the title and then being able to set or change the value of that variable later on in another section.

In Spark you would create the variable in a section kind of like this (incomplete code for example purposes):

    <html>
  <head>
    <global type='string' Title='"Site Name"'/>
    <title>${Title}</title>
  </head>
  <body>
    <div><use content="view"/></div>
  </body>
</html>

And then you could set it in a different view or section or whatever:

<set Title='product.Name + " - " + Title'/>

How would I go about doing something like this in Razor or just solving a similar problem if I have the wrong approach ?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/101395-global-variables-in-razor-view-engine