问题描述
GUID 属性的必要性是什么?为什么不让编译器自动处理呢?!
What is the necessity for the GUID attribute? why don't just let the compiler handle this automatically?!
推荐答案
如果编译器自动处理这个问题,你最终会遇到两种情况之一.
If the compiler handled this automatically, you'd end up with one of two situations.
每次编译时都会创建一个新的 GUID - 因为应该发布 GUID,所以这会失败.
A new GUID every time you compiled - since GUIDs are supposed to be published, this would fail.
冲突 - 如果 GUID 每次都相同,则基于(例如)名称的哈希,多个项目最终会出于不同目的使用相同的 GUID.
Collisions - if the GUID was the same every time, based on (say) a Hash of the name, multiple projects would end up using the same GUID for different purposes.
现有方法 - 显式 GUID 使开发人员能够根据需要控制这些.
The existing approach - an explicit GUID gives developers the power to control these as required.
这篇关于为什么首先需要 GUID 属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)