UriKind 列舉
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義不同類型的 URI。
public enum class UriKind
public enum UriKind
type UriKind =
Public Enum UriKind
- 繼承
欄位
| 名稱 | 值 | Description |
|---|---|---|
| RelativeOrAbsolute | 0 | URI 類型則不確定。 |
| Absolute | 1 | URI 是絕對的。 |
| Relative | 2 | URI 是相對的。 |
備註
絕對 URI 的特徵是對資源的完整參照(例如: http://www.contoso.com/index.html),而相對 URI 則依賴於先前定義的基底 URI(例如: /index.html)。
以下列表展示了一些使用 enum 的 UriKind API:
- Uri.Uri(String, UriKind)
- Uri.IsWellFormedUriString(String, UriKind)
- Uri.TryCreate(String, UriKind, Uri)