[00:03] this fixes something that has annoyed us for like 20 years. Let me show you with an example. Up until now, we didn't have a good way of expressing that a method could return more than one thing. If we look at this get user or throw method, [00:17] it can return a user in the happy path or throw an exception in the failure path. Now, this isn't transparent to the caller. They don't know that this throws an exception until they actually run into an exception and we used to go [00:30] around this with things like tuples, implementing the result pattern, or maybe using the one-off library. However, this all changes with .NET 11 and the introduction of union types. A union type lets us express a type that [00:45] consists of a closed set of types and to give you an example of that, you say give you an example of that, you say public union, this is the syntax, and we're going to create a user result. The syntax is similar to using a primary [00:59] constructor, except here you just define the types that are part of the union. And now that we have our union type, let's see how this improves our code. We can rewrite our original get user or throw method to the more expressive [01:14] version returning a user result, so we can return union types from methods and this can either be a user instance on the happy path or a not found instance in the failure path. And to consume a union type, you use a switch expression. [01:30] So, switch over the union instance and you consume the individual types. So, you define what happens if the instance is a user or what happens if the user is not found. The great thing is that this is exhaustive and if you omit a union [01:45] member, you're going to get a compiler error. So, let's say I leave out not found on purpose and I try to run our demo, you'll see that we get a build warning. This is current as of .NET 11 preview five and we also get a runtime [01:59] exception that our switch expression is non-exhaustive, and that we didn't cover the not found path. If I return this back in our code, and I rerun the example, you will see that both the old exception approach and the new union [02:13] type approach complete successfully. If you want to learn more about working with union types in C#, I highly recommend taking a look at the build session from Mads and Dustin that goes over this in much more detail. I'm going [02:26] to leave the link to this in the description of this video as well as the know in the comments what you think about the upcoming union types that we about the upcoming union types that we are getting with the next version of C#.