Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A URI is a specially formatted string that describes a resource on the Internet or a LAN, such as a web page, file, or email address. Examples include http://www.ietf.org, ftp://myisp/doc.txt, and mailto:joe@bloggs.com. The exact formatting is defined by the Internet Engineering Task Force (http://www.ietf.org/).
A URI can be broken up into a series of elements—typically,
scheme, authority, and
path. The Uri
class in the System namespace performs
just this division, exposing a property for each element. This is
illustrated in Figure 16-2.
The Uri class is useful when
you need to validate the format of a URI string or to split a URI into
its component parts. Otherwise, you can treat a URI simply as a
string—most networking methods are overloaded to accept either a
Uri object or a string.