3

What I mean is:

  • is it possible to have a generic numeric function in C# aiming to avoid the use of overloads for different numeric types such int, byte, double, float,...,vectors of int, ... , matrixes of complex numbers, weird never-seen-before structures that behave like numbers for some reason ecc..?

  • if not C# is there a language which can handle these kind of problems in a better way?

Thanks in advance.

  • 3
    Nope. Not without rewriting the framework. There is NO common ground between the numberic structs to use. – TomTom May 28 '20 at 17:40
  • I've seen an approach that might work, Related posts are based on C# 4.0 which is now aged almost 4-6 years. I just want to make sure that nothing has changed nor improved to start new with a cutting-edge approach – andrès coronado May 28 '20 at 18:01

0 Answers0