Skip to main content

甚于DH框架的䌘雅倄理倚类型返回倌库它允讞我们创建区类型的联合类型。这意味着我们可以明确定义䞀䞪方法可胜返回的所有类型而䞍需芁䜿甚继承或接口。

Total Downloads
520.9K
520,900
Published
May 8, 2026
Latest stable version

Install

.NET CLI
dotnet add package DH.OneOf --version 10.0.2026.50800027
Package Manager Console
Install-Package DH.OneOf -Version 10.0.2026.50800027
PackageReference
<PackageReference Include="DH.OneOf" Version="10.0.2026.50800027" />

Frameworks

net10.0 net9.0

Dependencies

OneOf
net10.0
[3.0.271, )
OneOf
net9.0
[3.0.271, )

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.