2.3. 英镑转千克:poundToKiloGram

    public float poundToKiloGram(float pound)
    {
        float kiloGram = pound * 0.45359237F;

        return kiloGram;
    }
    

例 2.3. poundToKiloGram 的使用范例


                else if (unitType.Equals("pounds"))
                {
                    float pound = float.Parse(weightNumberStr);
                    kiloGram = crl.poundToKiloGram(pound);
                }