Before I ask my question I must say that I read MSDN
website before and used Using System;
as namespace
for class.
When I use the class UriBuilder
with Using System
in my code,it is dis-active. What is the namespace of this class?
I am using visual studio 2008 and my operation system is 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.
http://msdn.microsoft.com/en-us/library/system.web.ui.design.urlbuilder(v=vs.110).aspx