Unity UnityWebRequest增加重试
摘要:逻辑比较简单,直接上代码: IEnumerator Request(string url, string method, Dictionary<string, string> headers, byte[] bodyRaw, int retryCount, System.Action<Downloa
阅读全文
posted @
2024-01-15 11:23
Jason_c
阅读(199)
推荐(0) 编辑
C#中的List<T>和Dictionary<TKey, TValue>的底层原理
摘要:List<T>和Dictionary<TKey, TValue>本质上上是顺序表,用数组来存储数据,在添加和删除数据时,如果需要调整数组长度,则需要进行数组拷贝。 也可以理解成就是对数组的一种扩展,从而使开发者更方便的调用添加、删除、插入等操作。 所以,优化的思路是,对于大概知道元素的数量时,在实例
阅读全文
posted @
2024-01-12 11:07
Jason_c
阅读(115)
推荐(0) 编辑