Skip to content

Instantly share code, notes, and snippets.

@jchannon
Created February 15, 2012 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchannon/1837449 to your computer and use it in GitHub Desktop.
Save jchannon/1837449 to your computer and use it in GitHub Desktop.
public class MyClass
{
public IDb MyDB {get;set;}
public MyClass(ISys A) {}
public DoSomething()
{
if (MyDB != null)
..
else
..
}
}
public class MyClass
{
private bool UsingDB = false;
public MyClass(ISys A, IDb B) { UsingDB = true; }
public MyClass(ISys A) {}
public DoSomething()
{
if (UsingFB)
..
else
..
}
}
public class MyClass
{
public bool UsingDB = false;
public MyClass(ISys A, IDb B) { }
public DoSomething()
{
if (UsingFB)
..
else
..
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment