Guid is all 0's (zeros)?

后端 未结 6 1208
忘掉有多难
忘掉有多难 2020-12-05 01:35

I\'m testing out some WCF services that send objects with Guids back and forth. In my web app test code, I\'m doing the following:

var responseObject = proxy         


        
6条回答
  •  时光取名叫无心
    2020-12-05 01:59

    Lessons to learn from this:

    1) Guid is a value type, not a reference type.

    2) Calling the default constructor new S() on any value type always gives you back the all-zero form of that value type, whatever it is. It is logically the same as default(S).

提交回复
热议问题