• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

How can I add two generics in C#?

Let's consider I have a functuon that takes two generic arguments T, add them and return sum as generic type T https://code.sololearn.com/c22b1HhJ6UYz/?ref=app

c#generic
23rd May 2019, 4:36 PM
erythrocyte
2 Answers
+ 4
See the code in the following link. https://code.sololearn.com/cjXf0fP0Ww7I/#cs
23rd May 2019, 5:46 PM
r1c5
r1c5 - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Problem with Javascript function
0 Votes
For Programming i need Patience
0 Votes
How can I print a Python set so it looks clean (no {} brackets or quotes)?
2 Votes
Html
0 Votes
Can someone help and explain better on slicing
1 Votes
How do I remove duplicates from a list but keep the order?
0 Votes
About css...
0 Votes
How do I print a multiplication table neatly?
0 Votes
Why we use return in function ?
0 Votes
Is there anyone who is working on algo bot (trading bot)
0 Votes