[英]UriBuilder namespace
Before I ask my question I must say that I read MSDN
website before and used Using System;
在问问题之前,我必须说我已经阅读过
MSDN
网站并使用过Using System;
as namespace
for class. 作为类的
namespace
。
When I use the class UriBuilder
with Using System
in my code,it is dis-active. 当我在代码中
Using System
带有“ Using System
的类UriBuilder
时,它是不活动的。 What is the namespace of this class? 此类的名称空间是什么?
I am using visual studio 2008 and my operation system is windows 7. 我使用的是Visual Studio 2008,操作系统是Windows 7。
The sample of code 代码示例
public partial class Form1 : Form
{
static public string AssemblyDirectory
{
get
{
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = (uri.Path);
return Path.GetDirectoryName(path);
}
}
This MSDN link shows you which namespace to use and the assembly you will need to reference to utilize this class for each version of the .NET framework. 此MSDN链接显示了要使用的名称空间,以及为每个版本的.NET Framework使用此类都需要引用的程序集。
http://msdn.microsoft.com/en-us/library/system.web.ui.design.urlbuilder(v=vs.110).aspx http://msdn.microsoft.com/zh-CN/library/system.web.ui.design.urlbuilder(v=vs.110).aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.