diff --git a/README.md b/README.md index bd635ec..9ffb5a0 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,8 @@ public readonly partial struct Union1 #### How to use +Multiple usage methods, you can manually determine the Tag field, or use pattern matching + ```cs var u = Union1.MakeA(123); @@ -314,6 +316,20 @@ if (u.IsA) { var a = u.A; } + +switch (u.Tag) +{ + case Union1.Tags.A: + break; + ... +} + +switch (u.Tag) +{ + case { IsA: true, A: var a }: + break; + ... +} ``` ---