UriParser.Register Method

Associates a scheme and port number with a UriParser.

Namespace: System
Assembly: System (in system.dll)

public static void Register (
	UriParser uriParser,
	string schemeName,
	int defaultPort
public static void Register (
	UriParser uriParser, 
	String schemeName, 
	int defaultPort
public static function Register (
	uriParser : UriParser, 
	schemeName : String, 
	defaultPort : int
Not applicable.



The URI parser to register.


The name of the scheme that is associated with this parser.


The default port number for the specified scheme.

Exception typeCondition


The uriParser or schemeName parameter is null.


The schemeName or defaultPort parameter is not valid.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0