Is Guid considered a value type or reference type?

前端 未结 6 1326
-上瘾入骨i
-上瘾入骨i 2021-01-03 18:32

Guids are created using the new keyword which makes me think it\'s a reference type.

Is this correct?

Guid uid = new Guid();

<
6条回答
  •  梦毁少年i
    2021-01-03 18:43

    Guid is a Value Type.

    See MSDN. Note that Guid is a struct. All structs are Value Types.

提交回复
热议问题