If you want to perform some specific actions depending on type, then consider this approach:
public interface IMachine
{
void DoSometing1( );
}
public class MachineLine : IMachine
{
public double X1;
public double Y1;
public double X2;
public double Y2;
public double Thickness;
public void DoSometing1( )
{
// . . .
}
}
public class MachineCircle : IMachine
{
public double CenterX;
public double CenterY;
public double Radius;
public void DoSometing1( )
{
// . . .
}
}
. . .
foreach( IMachine sth in m)
{
sth.DoSomething1( );
}