Hello,
Plz try this.
decimal amt=0;
decimal weight=Convert.ToDecimal(txtWeight.Text);
if(weight<=0.500)
amt=40;
else if (weight>=0.501 && weight<=1.000)
amt=55;
else if (weight>=1.001 && weight<=1.500)
amt=110;
else if (weight>=1.501 && weight<=2.000)
amt=165;
else if (weight>=2.001 && weight<=3.000)
amt=220;