c# - Math Sqrt(), Round(), Abs(), Max(), Min() and Ceiling() method

Math Sqrt(), Round(), Abs(), Max(), Min() and Ceiling() Method
MathClassExample.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Page_Load(object sender, System.EventArgs e) {
        double myNumber;
        myNumber = Math.Sqrt(9);
        Label1.Text = "Math.Sqrt(9): " + myNumber + "<br/>";

        myNumber = Math.Round(69.566, 2);
        Label1.Text += "<br/>Math.Round(69.566, 2): " + myNumber + "<br />";

        myNumber = Math.Abs(9);
        Label1.Text += "<br/>Math.Abs(9) : " + myNumber + "<br />";

        myNumber = Math.Max(13, 19);
        Label1.Text += "<br/>Math.Max(13, 19) : " + myNumber + "<br />";

        myNumber = Math.Min(13, 19);
        Label1.Text += "<br/>Math.Min(13, 19) : " + myNumber + "<br />";

        myNumber = Math.Ceiling(50.1);
        Label1.Text += "<br/>Math.Ceiling(50.1) : " + myNumber + "<br />";
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>asp.net Math Class Example: Math.Sqrt(), Math.Round(), Math.Abs(), Math.Max(), Math.Min(), Math.Ceiling()</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Teal">Math Class Example</h2>
        <asp:Label ID="Label1" runat="server" Font-Size="Larger" ForeColor="HotPink"></asp:Label>
    </div>
    </form>
</body>
</html>
More asp.net examples