Access function defined in _ViewStart.cshtml
In an ASP.MVC application, I have a function defined in my **_ViewStart.cshtml** like this:

    @functions
    {
        public void Foo()
        {
          ....
        }
    }
When I try to use this function in of my views, I get an exception saying that :
*The name 'Foo' does not exist in the current context*
I thought that all what I define in _ViewStart.cshtml is accessible to all my views that define it as layout.

I am missing something here ...
Thank you for your help
Access function defined in _ViewStart.cshtml
===

In an ASP.MVC application, I have a function defined in my **_ViewStart.cshtml** like this:

    @functions
    {
        public void Foo()
        {
          ....
        }
    }
When I try to use this function in of my views, I get an exception saying that :
*The name 'Foo' does not exist in the current context*
I thought that all what I define in _ViewStart.cshtml is accessible to all my views that define it as layout.

I am missing something here ...
Thank you for your help