Parameter passing

J

Jon

Hello all.

I have a method that accepts a parameter, but this
parameter can potentially be of any type (string, int,
etc). What would be there best way to implement this? Have
an Overloading method for each type?

Thanks all,

Jon.

P.S I'm using C#
 
K

Kiran Kumar

Try passing the parameter as an object and then convert it
to the appropriate datatype.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top