using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ClearArrayText : MonoBehaviour { // Use this for initialization void Start () { int[] intArray = new int[] { 1, 5, 9, 4 }; Array.Clear(intArray, 0, intArray.Length);//清空第0到第intArray.Length个索引的元素.(包括第0个,不包括第intArray.Length个) foreach (var item in intArray) { Debug.Log(item); } } }
C# 清空数组Array.Clear
免责声明:文章转载自《C# 清空数组Array.Clear》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇【原创】【ueditor】监听内容ESP32开发(2)esp32-cam采集图像下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=