Why was an interface for arithmetic operations abandon in .NET? [closed]

若如初见. 提交于 2019-12-22 04:18:17

问题


In .NET it is not possible to constrain a generic method so it only accepts numeric types as described in the following question: Is there a constraint that restricts my generic method to numeric types?.

But if you look at the reference source for .NET (http://sourceof.net) and look at the source code for the primitive types (Int32, Int64, Single, etc) there is a reference to something called IArithmetic<T> with an implementation of the interface for all primitive types but the implementation has been commented out.

The definition of the interface cannot be found, but looking at the implemented methods the interface defines the required methods for a generic numerics interface.

So my question is: Why was this work abandon?

来源:https://stackoverflow.com/questions/25015044/why-was-an-interface-for-arithmetic-operations-abandon-in-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!