I know the default is ByVal in C#. I used same variable names in many places and then I noticed passed values change and come back. I think I knew scope mechanism of C# wron
You are passing the licence argument by value; essentially this means you can modify any public properties of the object. However, if you reassign the reference of the licence object to a new object, i.e. if you did this:
public static void InsertLicense(License license)
{
license = new Licence();
UpdateLicense(license);
}
the caller won't reference the new license object defined in the static method unless you passed it by ref.
Remember that all parameters are passed into methods by value unless you use the ref or out keywords.