We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
定义一个枚举,继承 ushort
public enum EGenderType : ushort { 男 = 0, 女 = 1, 未知性别 = 2, 未说明性别 = 9 }
System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'AuthCenter.Core.Enums.EGenderType' to type 'System.Int32'. Source=System.Linq StackTrace: 在 System.Linq.Enumerable.<CastIterator>d__68`1.MoveNext() 在 /_/src/libraries/System.Linq/src/System/Linq/Cast.cs 中: 第 55 行 在 System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items) 在 /_/src/libraries/Common/src/System/Collections/Generic/LargeArrayBuilder.SpeedOpt.cs 中: 第 112 行 在 System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source) 在 /_/src/libraries/Common/src/System/Collections/Generic/EnumerableHelpers.Linq.cs 中: 第 84 行 在 OSharp.Authorization.EntityInfos.EntityInfoBase.<>c.<FromType>b__18_1(PropertyInfo property) 在 System.Linq.Enumerable.WhereSelectArrayIterator`2.ToArray() 在 /_/src/libraries/System.Linq/src/System/Linq/Where.SpeedOpt.cs 中: 第 218 行 在 OSharp.Authorization.EntityInfos.EntityInfoBase.FromType(Type entityType) 在 OSharp.Authorization.EntityInfos.EntityInfoHandlerBase`2.Initialize() 在 OSharp.Authorization.EntityInfos.EntityInfoPack.UsePack(IServiceProvider provider) 在 Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.UseOSharp(WebApplication app) 在 Schoolmate.Startup.Configure(WebApplication app) 在 D:\Workspace\QBN\Schoolmate\Schoolmate\Startup.cs 中: 第 62 行 在 Program.<Main>$(String[] args) 在 D:\Workspace\QBN\Schoolmate\Schoolmate\Program.cs 中: 第 9 行
枚举转换时不应该粗暴的转成int
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
描述一下BUG
定义一个枚举,继承 ushort
重现步骤
期望行为
枚举转换时不应该粗暴的转成int
The text was updated successfully, but these errors were encountered: