using System; using ValueRef; class Program { static void Main() { ValueRefmyValue = new ValueRef (10); Console.WriteLine("My value is: " + myValue); MyMethod(myValue); Console.WriteLine("My value is still: " + myValue); } static void MyMethod(ValueRef myValue) { Console.WriteLine("My value is: " + myValue); myValue.Value = 20; Console.WriteLine("My value is now: " + myValue); } }
dotnet add package ValueRefThis will download and install the ValueRef package into your project, and you'll be able to start using it immediately.