Created
December 14, 2010 02:57
-
-
Save jaykz52/739943 to your computer and use it in GitHub Desktop.
An example of a situation where a developer is limited by constructor rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this class doesn't compile! | |
public class DBConnection | |
{ | |
public DBConnection(string pConnectionString, bool pIsTransactional) | |
{ | |
// do something mind-blowingly awesome | |
} | |
public DBConnection(string pConnectionString, bool pKeepAlive) | |
{ | |
// this would do something awesome if the compiler wouldn't complain! | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment