Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]
Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]
Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]
Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]
Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]
Is it possible to change the return type of a method based on what is passed in as a parameter? [duplicate]
This question already has answers here: Cannot convert type ‘System.Windows.Forms.Control’ to ‘T’ (6 answers) Closed 21 hours ago. Is it possible for the same method have different return types based on what is passed in, so that for example GetScripts(new Camera()) returns a Camera and GetScripts(new Cube()) returns a Cube? I have three classes: public […]