Is it possible to create constructor-extension-method ? how?

后端 未结 4 606
半阙折子戏
半阙折子戏 2020-12-30 18:22

Is it possible to add a constructor extension method ? I want to add a List< T > constructor to receive specific amount of bytes out of a given partially filled buffer (w

4条回答
  •  情深已故
    2020-12-30 18:37

    In a word - no. Take a look at this for some explanation.

    They were cut from the C# 3 feature list, then they were cut from the C# 4 feature list, and we can only hope that they could make the C# 5 features, but I'm not very optimistic.

提交回复
热议问题