Will the compiler only compile code that can get executed?

后端 未结 6 1961
梦谈多话
梦谈多话 2020-12-15 03:37

I have a class library and am using only part of it. Is there a need to delete what isn\'t being used in order to shrink the size of the created code (in release configurati

6条回答
  •  粉色の甜心
    2020-12-15 04:01

    I doubt the compiler will remove anything. The fact is, the compiler can't tell what is used and what is not, as types can be instantiated and methods called by name, thanks to reflection.

提交回复
热议问题