<%@ Page Language="C#" %><script runat="server">
void Page_Load() { int a = 1; int b; Increment(a, out b); //out和ref的区别就是out可以不先初始化 lblMessage.Text = b.ToString(); } void Increment(int Number, out int Result) { Result = Number + 1; }
</script><html><head> <title>Chapter 5 - Demonstration of using out Parameters</title></head><body> <asp:Label id="lblMessage" runat="server"></asp:Label></body></html>
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18