Could we have this code for .NET10 and below?
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct,
AllowMultiple = false)]
public sealed class UnionAttribute : Attribute;
public interface IUnion
{
object? Value { get; }
}
}
Looks like it will be added to .NET 11 in the later previews:
https://devblogs.microsoft.com/dotnet/csharp-15-union-types/#try-it-yourself
Could we have this code for .NET10 and below?
Looks like it will be added to .NET 11 in the later previews:
https://devblogs.microsoft.com/dotnet/csharp-15-union-types/#try-it-yourself