I am trying to program an interesting trick I believe I once saw in a Java program, and possibly in some C# code.
I have a static method that takes an ID as an integer, looks it up in a table, then uses the information from that row to create and return an instance of that class. The thing is, I want to make a certain constructor visible only to my static function, and not to just anyone. I've looked over the modifies for various levels of protection, but cannot seem to locate any that might accomplish this task. Does anyone have any ideas how I might achieve this?