Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function template in C#

Status
Not open for further replies.

ajikoe

Programmer
Apr 16, 2004
71
ID
Hello,

I usually use C++ to program.
For treating types of variable in my function I use template, for example:

template<class t>
t myfunc(t myvar){
return, t+1;
}

Is that possible to use template in C#, if it can't, can someone tell me the best way to handle different types data instead of using overloading function?

Pujo
 
ajikoe

.NET won't have templates until the next release. Sorry.

They'll be called "Generics", and I'm looking forward to them too (no more writing tons of code for strongly-typed collections!!)

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top