Using out Parameters (C#)
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load()
{
int a = 1;
int b;
Increment(a, out b);
lblMessage.Text = b.ToString();
}
void Increment(int Number, out int Result)
{
Result = Number + 1;
}
</script>
<html>
<head>
<title>Demonstration of using out Parameters</title>
</head>
<body>
<asp:Label id="lblMessage" runat="server"></asp:Label>
</body>
</html>
Related examples in the same category