Pure C# IL Intepreter Runtime, which is fast and reliable for scripting requirement on enviorments, where jitting isn't possible.
2.99k
stars
655
forks
source link
在async方法下使用字典TryGetValue out 一个继承主工程的类型,返回值错误的设为适配器类型 #759
Open
827922094 opened 1 year ago
在async下使用字典TryGetValue out一个继承主工程类型的对象,返回值异常
static async void Test() { Dictionary<string, SingleRankingItem> keyValuePairs = new Dictionary<string, SingleRankingItem>(); keyValuePairs.Add("95",new SingleRankingItem ()); if (keyValuePairs.TryGetValue("95", out SingleRankingItem value)) { UnityEngine.Debug.LogError(value.GetType().FullName); } }
这里应该返回的是SingleRankingItem 对象,但是却返回了XXXX.Adapter
Unity Version 2021.3.15f1
ILRuntime Version 2.0.2