First of all, if you want variables 'a and 'b to be modified in the method, you don't have to pass them ! The two variables are declared outside the
scope of the method, therefore any change made to them in the method will
persist "outside" the method.
Passing parameters by reference is an important part of the programmer's toolbox, and you should fully understand it. In C# you need to practice using both 'ref and 'out modifiers to parameters, and understand the difference.
Both 'ref and 'out enable passing values or objects by reference: 'out does not require the passed reference to be initialized, and 'ref requires it be initialized. Assigning a value to the variable to passed using 'out before it is passed will result in a compile time error.
I suggest you study these articles by Jon Skeet very carefully: [
^], [
^]. If they are confusing ... too advanced for you right now ... then try Charles Petzold's book "Dot Net Zero" (free): [
^].