Hi All,
I am new to C#, would someone share their insight on "differences between method overloading and Generics" .can't one use method overloading instead of Generics.How is Generics understood by the C# compiler at run time.
Regards
Harsha
Differences between method overloading and Generics
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393K pointsPosted Apr 20, 2009, 10:13 AM EDT
Generics on the other hand does not have predefined types. You can pass any type in generics because they work based on object type.
For execution purpose, method overloading is faster then generics.
Both are two different things and you can't compare. Purpose is different. I suggest you search this site for generics to learn more about them.