• Output parameters do not need to be initialized before they passed to the method.
The reason for this is that the method must assign output parameters before exiting.
• Reference parameters must be initialized before they are passed to the method.
The reason for this is that you are passing a reference to an existing variable. If you
don’t assign it to an initial value, that would be the equivalent of operating on an
unassigned local variable.
тебе должно быть знакомо понятие инициализированная переменная и нет
Я это все понимаю, просто не могу догнать зачем передавать значение переменной по ссылке в метод, если тоже самое будет если просто передать переменную в метод без ref
А out используют в любом случае где хотят вернуть из метода больше чем 1 значение
public static bool TryParse (string s, out int result);