static void Main(string[] args) { Foobar foo = new Foobar(); Processor processor = new Processor(); processor.Process(ref foo); Console.WriteLine($"Foobar.Bar value = {foo.Bar}"); Console.ReadKey(); }
public void Process(ref Foobar foo) { foo.Bar = "some text"; }