How should I cast in VB.NET?

前端 未结 7 557
再見小時候
再見小時候 2020-11-29 17:29

Are all of these equal? Under what circumstances should I choose each over the others?

  • var.ToString()

  • CStr(var)

  • CType(var,

7条回答
  •  北海茫月
    2020-11-29 18:01

    At one time, I remember seeing the MSDN library state to use CStr() because it was faster. I do not know if this is true though.

提交回复
热议问题