Merge pull request #446 from WeihanLi/update-compile-condition

update compile condition
This commit is contained in:
Dong Bin
2024-10-27 12:51:11 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ public class EnumSelector: TemplatedControl
}
// netstandard 2.0 does not support Enum.GetValuesAsUnderlyingType, which is used for native aot compilation
#if NET8_0_OR_GREATER
#if NET
private List<EnumItemTuple> GenerateItemTuple()
{
if (EnumType is null) return new List<EnumItemTuple>();

View File

@@ -367,7 +367,7 @@ public abstract class NumericUpDownBase<T> : NumericUpDown where T : struct, ICo
text = text.Substring(1);
}
}
#if NET8_0_OR_GREATER
#if NET
else if ((numberStyles & NumberStyles.AllowBinarySpecifier) != 0)
{
if (text.StartsWith("0b") || text.StartsWith("0B")) // support 0b bin while user input