Skip to main content

Area

 server---

    public string circle(double rad)
        {
            double area = 0.0, volume = 0.0;
            area = 4 * 3.14 * (rad * rad);
            volume = ((double)4 / 3) * 3.14 * (rad * rad * rad);
            return "Area of circle is " + area + " and volume of circle is " + volume;
        }

client---

        ServiceReference1.WebService1SoapClient obj = new ServiceReference1.WebService1SoapClient();
            double num = Convert.ToDouble(TextBox1.Text);
            String res = obj.circle(num);
            Label2.Text = res;

Comments