Skip to content

Instantly share code, notes, and snippets.

@BojanKomazec
Created December 21, 2015 14:19
Show Gist options
  • Save BojanKomazec/2c6aaf324f292f3a4929 to your computer and use it in GitHub Desktop.
Save BojanKomazec/2c6aaf324f292f3a4929 to your computer and use it in GitHub Desktop.
using System;
public class Program
{
public static void Main()
{
var c = new C();
c.FooCall(123);
c.FooCall(456);
}
}
public class C
{
public void FooCall(int i)
{
this.Foo(i);
}
private void Foo(int i)
{
var s = "test1";
this.Bar(i, s);
// do something...
s = "test2";
this.Bar(i, s);
// do something
s = "test3";
this.Bar(i, s);
// etc...
}
private void Bar(int i, string s)
{
Console.WriteLine($"i = {i}, s = {s}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment