Which is more efficient Cstr(value) or value.ToString()

前端 未结 9 952
我在风中等你
我在风中等你 2021-01-11 14:56

I am wondering which is more efficient, using CStr() or object.toString(). The reason I ask this is because I though all that CStr() done was to invoke the .ToString() metho

9条回答
  •  借酒劲吻你
    2021-01-11 15:33

    One BIG difference between CStr as ToString is handling of Enum variables.

    CStr returns the underlying number e.g. "2" and ToString returns the Enum name e.g. "LeftToRight"

提交回复
热议问题