Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们可以自动为 Guid 赋值吗?例如,我希望这是我的 guid 的值:“914aaa44-4e11-e311-96f7-d8d3855b1531”
有可能吗?
如果您每次都想要一个新的 GUID
Guid guid = Guid.NewGuid();
如果您想要特定的 guid 使用(以您的示例为例)
Guid guid = new Guid("914aaa44-4e11-e311-96f7-d8d3855b1531");