public object getAttribute(int index)//获取属性值 { return(attributepart.GetValue(index)); }
static void WriteAttributes(GISAttribute attribute, BinaryWriter bw) { for (int i = 0; i < attribute.ValueCount(); i++) { Type type = attribute.GetValue(i).GetType(); if (type.ToString() == "System.Boolean") { bw.Write((bool)attribute.GetValue(i)); } else if (type.ToString() == "System.Byte") { bw.Write((byte)attribute.GetValue(i)); } else if (type.ToString() == "System.Char") { bw.Write((char)attribute.GetValue(i)); } else if (type.ToString() == "System.Decimal") { bw.Write((decimal)attribute.GetValue(i)); } else if (type.ToString() == "System.Double") { bw.Write((double)attribute.GetValue(i)); } else if (type.ToString() == "System.Single") { bw.Write((float)attribute.GetValue(i)); } else if (type.ToString() == "System.Int32") { bw.Write((int)attribute.GetValue(i)); } else if (type.ToString() == "System.Int64") { bw.Write((long)attribute.GetValue(i)); } else if (type.ToString() == "System.UInt16") { bw.Write((ushort)attribute.GetValue(i)); } else if (type.ToString() == "System.UInt32") { bw.Write((uint)attribute.GetValue(i)); } else if (type.ToString() == "System.UInt64") { bw.Write((ulong)attribute.GetValue(i)); } else if (type.ToString() == "System.SByte") { bw.Write((sbyte)attribute.GetValue(i)); } else if (type.ToString() == "System.Int16") { bw.Write((short)attribute.GetValue(i)); } else if (type.ToString() == "System.String") { GISTools.WriteString((string)attribute.GetValue(i), bw); } } }