Is it possible to pass two different types to a function and have it accept it, and recognize which types it receives?
For instance you can't pass a string to a function that expects an int. Here's the way I'm doing it right now, but perhaps there's another way?
Pseudocode:
function myFunction(incomingType1:myType1=null,incomingType2:myType2=null)
and then call it with:
myFunction(something:myType1,null)
myFunction(null,somethingElse:myType2)
Possible, or not? :)
For instance you can't pass a string to a function that expects an int. Here's the way I'm doing it right now, but perhaps there's another way?
Pseudocode:
function myFunction(incomingType1:myType1=null,incomingType2:myType2=null)
and then call it with:
myFunction(something:myType1,null)
myFunction(null,somethingElse:myType2)
Possible, or not? :)