Difference between the System.Array.CopyTo() and System.Array.Clone()

前端 未结 13 2161
攒了一身酷
攒了一身酷 2020-12-02 06:50

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 07:18

    Clone() is used to copy only structure of data/array it doesn't copy the actual data.

    CopyTo() copies the structure as well as actual data.

提交回复
热议问题