public static void Main()
var myString = "initial value";
MyMethod(myString, MyRefMethod(ref myString));
public static string MyRefMethod(ref string str)
Console.WriteLine("Method call start");
Console.WriteLine("Method call end");
return "this variable doesn't really matter for this example";
public static void MyMethod (string importantString, string doesntMatterString)
Console.WriteLine(importantString);