<%@ Page Language="C#" %>
<script runat="server">
void Page_Load()
{
int a = 1;
Increment(ref a);
lblMessage.Text = a.ToString();
}
void Increment(ref int Number)
{
Number += 1;
}
</script>
<html>
<head>
<title>Demonstration of Passing a Parameter by Reference</title>
</head>
<body>
<asp:Label id="lblMessage" runat="server"></asp:Label>
</body>
</html>
|