public static void Main()
public static string MyRefMethod(ref string str)
return "this variable doesn't really matter for this example";
public static void MyMethodForExampleOne(string importantString, string doesntMatterString)
Console.WriteLine(importantString);
public static void MyMethodForExampleTwo(string doesntMatterString,string importantString)
Console.WriteLine(importantString);
public static void ExampleOne()
Console.WriteLine("---------EXAMPLE ONE----------");
var myString = "initial value";
MyMethodForExampleOne(myString, MyRefMethod(ref myString));
public static void ExampleTwo()
Console.WriteLine("---------EXAMPLE TWO----------");
var myString = "initial value";
MyMethodForExampleTwo(MyRefMethod(ref myString),myString);