Search

Index

Revindex Task Scheduler

Using functions (Razor C#)

Last updated on 2015-04-17 1 mins. to read

You can create functions in Razor (C#) for more complex operations:

@functions{
  private string HelloWorld(){
      return "Hello world!";
  }
}

@{
  System.IO.File.WriteAllText("C:\\MyFolder\\MyFile.txt", HelloWorld());
}

Comments


Powered by Revindex Wiki