摘要: String.Join(String, String[]) 在指定 String 数组的每个元素之间串联指定的分隔符 String,从而产生单个串联的字符串 例如: string [] array={abc,def,ghi};string a = string.Join("-", array); 此 阅读全文
posted @ 2018-03-21 20:35 朋丶Peng 阅读(25051) 评论(0) 推荐(3) 编辑
摘要: void Start () { List<int> list = new List<int>(); list.Add(1); list.Add(1); list.Add(3); list.Add(6); //list转到数组 int[] array = list.ToArray(); for (in 阅读全文
posted @ 2018-03-21 20:07 朋丶Peng 阅读(7555) 评论(2) 推荐(0) 编辑
摘要: 结果如下图: Type.GetFields 返回当前 Type 的所有公共字段。 注意要引用命名空间:using System.Reflection; 阅读全文
posted @ 2018-03-21 19:46 朋丶Peng 阅读(7027) 评论(0) 推荐(0) 编辑
摘要: this.gameObject.scene.name 阅读全文
posted @ 2018-03-21 19:13 朋丶Peng 阅读(1248) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; public class Example { public static void Main() { List dinosaurs = new List(); dinosaurs.Add("Pachycephalosaurus"); ... 阅读全文
posted @ 2018-03-21 19:11 朋丶Peng 阅读(14667) 评论(0) 推荐(0) 编辑