private void SomeCoolrMethod()
{
for (var i = 0; i < 90000; i++)
{
var pamar1 = SetParam1();
var pamar2 = SetParam2();
var pamar3 = SetParam3();
var pamar4 = SetParam4();
var pamar5 = SetParam5();
DoMethod1(param1, param3, param4);
DoMethod2(param1,param2, param4);
DoMethod3(param3,param4,param5);
}
}
class SomeCool
{
private T pamar1;
private T pamar2;
private T pamar3;
...
private void SomeCoolrMethod()
{
for (var i = 0; i < 90000; i++)
{
var pamar1 = SetParam1();
var pamar2 = SetParam2();
var pamar3 = SetParam3();
var pamar4 = SetParam4();
var pamar5 = SetParam5();
DoMethod1(param1, param3, param4);
DoMethod2(param1, param2, param4);
DoMethod3(param3, param4, param5);
}
}
}
void MyMethod()
{
Func<int> pamar1 = () => 1 * 2;
Func<int> pamar2 = () => 3 * 4;
Func<int> pamar3 = () => 5 * 6;
for (var i = 0; i < 10; ++i)
{
DoMethod(pamar1, pamar2, pamar3);
}
}
void DoMethod(Func<int> pamar1, Func<int> pamar2, Func<int> pamar3)
{
Console.WriteLine(pamar1() * pamar2() * pamar3());
}