How can I generate UUID in C#

前端 未结 5 640
不知归路
不知归路 2020-11-29 20:23

I am creating an .idl file programmatically. How do I create UUIDs for the interfaces and Methods Programmatically.

Can I generate the UUID programmatically?

5条回答
  •  不知归路
    2020-11-29 20:40

    I have a GitHub Gist with a Java like UUID implementation in C#: https://gist.github.com/rickbeerendonk/13655dd24ec574954366

    The UUID can be created from the least and most significant bits, just like in Java. It also exposes them. The implementation has an explicit conversion to a GUID and an implicit conversion from a GUID.

提交回复
热议问题