U can do the same thing in C#. Remember that in C# instances of a class are references.
class A{
public static int a;
public static double b;
public A(){
}
}
A myFunction(int parameter1, double parameter2){
A result = new A();
A.a = parameter1;
A.b = parameter2;
return A;
}
This function should return a reference to an instance of class A.
Hope this answers your question.