Hi Marcelo,
As Owen mentioned, the IPointCollection is an interface of the Shape. Rather than casting your feature from IFeature to IPointCollection, you should get the shape from the feature using the Shape property, then cast that to IPointCollection.
var myPolyline = myFeature.Shape;
var myPointCollection = (IPointCollection)myPolyline;
As Owen also mentioned, the Shape is only guaranteed to be a type of IGeometry, so you don't know that the concrete type is definitely a PolylineClass, so you may need to use the GeometryType property of IGeometry to ensure you are dealing with polyline shapes.
Cheers,
Todd