使用 c# 的 asp.net 的 GUID 问题
在 Microsoft Visual Web Developer 2005 Express Edition 中,我找不到 System.Guid
类型。是我的版本有问题还是有其他问题? IntelliSense 无法识别 System.Guid
。
In Microsoft Visual Web Developer 2005 Express Edition, I can't find the type System.Guid
. Is there problem with my version or do I have another problem? System.Guid
is not recognized in IntelliSense.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要导入正确的程序集,并引用正确的命名空间。确保在项目中引用
mscorlib.dll
,并且在代码文件中导入System
命名空间(或输入System.Guid
> 而不仅仅是Guid
)。要添加对 C# 项目的引用,请右键单击“引用”,选择“添加引用...”,然后在列表中选择程序集(或浏览或引用另一个项目,或执行任何您需要执行的操作)。
在 VB.NET 中,您可以打开项目属性(双击“我的属性”)并选择左侧的“引用”选项卡。
You need to import the proper assemblies, and reference the correct namespaces. Make sure have a reference to
mscorlib.dll
in your project, and that theSystem
namespace is imported in the code file (or typeSystem.Guid
instead of justGuid
).To add a reference to a C# project, right click "References", choose "Add reference..." and pick the assembly in the list (or browse, or reference another one of your projects, or whatever you need to do).
In VB.NET, you instead open the project properties (double-click "My Properties") and choose the tab "References" on the left.
我以前见过这样的问题。您是否定义了一个名为
System
的类?如果失败,请按照托马斯帖子中的指示检查您的参考资料。
I've seen a issue like this before. Have you defined a class called
System
?Failing that check your references as directed in Tomas's post.