Marshal.GenerateGuidForType 与 GetType().GUID 不同吗?
只是想知道这两种方法是否可以实现同一目标?
注意:GetType().GUID
可以获取 GuidAttribute
。那么 Marshal.GenerateGuidForType 方法是否做了任何额外的事情?
[Guid("DC05F01B-32FC-4CCE-AC0D-854E8B6471FC")]
just wondering if these are two methods to achieve the same thing?
note: GetType().GUID
picks up the GuidAttribute
okay. So is the Marshal.GenerateGuidForType
method doing anything extra?
[Guid("DC05F01B-32FC-4CCE-AC0D-854E8B6471FC")]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Marshal 的文档.GenerateGuidForType():
Have a look at the documentation for
Marshal.GenerateGuidForType()
: