Q:

Method that takes Input from user in C#

I'm switching to C# from C++ and I'm trying to learn the methods. Can you help me create a method that takes 2 variables as input from the user? In C++ it was pretty easy just making a void method and adding & before the variable's name like: void Input( int &a, int &b) which would save any changes in their value in the main function. Is there a way to do that in C#? 

A:

In C# you have two options for T &x of C++:

ref parameters - these have the same capabilities as C++ reference parameters, and
out parameters - these allow passing data back from a method, but not into the method.

In your case, out is more appropriate, because it lets you pass variables that have not been previously assigned:
void Input( out int a, out int b) {
    ... // Read and assign a and b
}

You can call this method like this:
// In C# 7
Input(out int a, out int b);    
// Prior to C# 7
int a, b;
Input(out a, out b);

Note that unlike C++ where taking reference is automatic, C# requires you to mark it with the keyword out.

