NewGuid vs System.Guid.NewGuid().ToString(“D”);

前端 未结 4 1617
清酒与你
清酒与你 2021-01-30 17:35

Is there a difference when you generate a GUID using NewGuid(); vs System.Guid.NewGuid().ToString(\"D\"); or they are the same thing?

4条回答
  •  野的像风
    2021-01-30 18:03

    Using System.Guid.NewGuid() you will get a object of Guid type

    Using System.Guid.NewGuid().ToString("D"); you will get the string representation of Guid object

    Also as I know no difference between .ToString("D") and .ToString()

提交回复
热议问题