I wanted to know if there was a way to create a method that can accept variable data types.
Sometime I need to pass objects to that method sometimes primitive types such as
SomeMethod(object);
SomeMEthod(r,p,q); //Where r,p,q are integers
What would the signature of such a method look like ?
If you don’t know the type before hand, and it can really be ANY type, then an
objectparameter would work for both, reference and value types.Example:
MSDN documentation