Class
Uri
class Uri
Module: System
Assembly: System.Runtime.dll
Source file: Uri.rvn
Inheritance: Object → Uri
Implements: EquatableTo<Uri>
An immutable validated ASCII URI reference.
Remarks
Development contract: escaped ASCII up to 4096 bytes. No I/O, implicit escaping, IDNA, IRI or bracketed IP literals. Equality and hashing use exact Text, including casing, escaping and fragment; they are not resource or origin equivalence. Parsing does not imply HTTP transport support.
Properties
3 items
IsAbsolute: bool
Gets whether the reference has a scheme; this does not imply HTTP support.
IsRelative: bool
Gets whether the reference has no scheme.
Text: string
Gets exact validated text.
Methods
8 items
Equals(other: Uri) -> bool
Compares exact Text, including case, escaping and fragment.
Implements EquatableTo<Uri>.Equals
Equals(other: object?) -> bool
Compares exact Text when the object is a Uri; returns false for null or another type.
Overrides Object.Equals
GetHashCode() -> int
Returns a hash consistent with exact Text equality.
Overrides Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Static member:
Parse(text: string) -> Result<Uri, UriError>
Validates a relative or absolute URI reference without normalization.
Resolve(reference: string) -> Result<Uri, UriError>
Resolves a reference against this absolute base using RFC 3986 section 5.2.
Resolve(reference: Uri) -> Result<Uri, UriError>
Resolves a reference against this absolute base using RFC 3986 section 5.2.
ToString() -> string
Returns Text without decoding or further normalization.
Overrides Object.ToString