Use of C # GUID

 GUID (Globally universal identifier) ​​refers to the numbers on a machine-generated, it guarantees for all machines in the same space and time are unique. Usually the platform will provide an API to generate a GUID. Generation algorithm is very interesting, use the Ethernet card address, nanosecond time, the chip ID code and a number of possible numbers. The only flaw is that the results generated GUID string will be relatively large.

 GUID is always convenient for all aspects of program development, .NET Framework simplifies the process of building and handling GUID values. Where .NET program needs, this feature easily generate unique values.
 

  Example:
  .. 1, Guid.NewGuid () the ToString ( "N") results:
    38bddf48f43c48588e0d78761eaa1ce6
  . 2, Guid.NewGuid () the ToString ( "D") results:
    57d99d89-CAAB-482a-a0e9-a0a803eed3ba
  . 3, the Guid. . NewGuid () ToString ( "Bresults:
    {09f140d5-af72-44ba-c861304b46f8}-a763
  . 4, Guid.NewGuid () the ToString ( "P") results:.
    (778406c2-EFFF-ab03--4262 70a77d09c2b5)
  The default for the first two kinds of effects

Reproduced in: https: //www.cnblogs.com/cy-across-I/p/3177746.html

Guess you like

Origin blog.csdn.net/weixin_34252090/article/details/94107959