Skip to content

Instantly share code, notes, and snippets.

View Chasmical's full-sized avatar

Chasmical Chasmical

  • 03:18 (UTC +07:00)
View GitHub Profile
@Chasmical
Chasmical / NETSTANDARD_OR_GREATER.md
Last active August 20, 2023 19:28
Define OR_GREATER for .NET Standard versions when targeting .NET Core/Framework

So, I had this code that I wanted to work properly:

namespace AbbLab.Compatibility
{
    public static class Shims
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static T[] Empty<T>()
#if NETSTANDARD1_3_OR_GREATER