Extension Method Performance

后端 未结 5 1791
臣服心动
臣服心动 2020-12-10 15:57
            /*I have defined Extension Methods for the TypeX like this*/ 
        public static Int32 GetValueAsInt(this TypeX oValue)
        {
            return I         


        
5条回答
  •  不思量自难忘°
    2020-12-10 16:28

    In the worst case you'll have an extra function call. Seriously, though, I would hope that it ought to be able to inline this code as simple as it is and not have any noticeable effect.

提交回复
热议问题