Implicit/Explicit conversion with respect to the “as” keyword

前端 未结 4 1794
梦谈多话
梦谈多话 2020-12-18 09:36

I\'m trying to do some unit testing on a project that unfortunately has high level of unit interdependence. Currently, a lot of our classes look to a custom UserId

4条回答
  •  萌比男神i
    2020-12-18 10:02

    as does not invoke conversion operators. See: http://msdn.microsoft.com/en-us/library/cscsdfbt(v=VS.100).aspx

    Use a (cast).

提交回复
热议问题