日期:2014-05-18 浏览次数:20989 次
List<Point3D> pp = new List<Point3D >(); pp.Add(new Point3D(1, 1, 1)); pp.Add(new Point3D(1, 2, 1)); pp.Add(new Point3D(1, 3, 1)); Point3D[] pp1 = pp.GetType().GetField("_items", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(pp) as Point3D[]; pp1[1].Y=5
------解决方案--------------------
查看了MSDN才发现Point3D 是个struct
[SerializableAttribute] [TypeConverterAttribute(typeof(Point3DConverter))] public struct Point3D : IFormattable