var fields = featureClass.GetDefinition().GetFields();
// Use the z-values from the geometries as the height field
Field heightField = fields.First(f => f.FieldType == FieldType.Geometry);
// Set the vertices from the geometries as TIN nodes
tinEditor.AddFromFeatureClass(featureClass, null, heightField, null, TinSurfaceType.MassPoint);
// Use the object ids as tag values
Field tagField = fields.First(f => f.FieldType == FieldType.OID);
// Set the lines from the geometries as TIN edges
tinEditor.AddFromFeatureClass(featureClass, null, heightField, tagField, TinSurfaceType.HardLine);
// Only use certain geometries in the TIN
QueryFilter filter = new QueryFilter()
{
ObjectIDs = new List<long> { 2, 6, 7, 8, 9, 10, 14, 17, 21, 22 }
};
tinEditor.AddFromFeatureClass(featureClass, filter, heightField, tagField, TinSurfaceType.HardLine);