静态变量的名称,和方法的参数名称相同时

public class WebForm1 : System.Web.UI.Page
{

    
static string URL = "jeky.cn";

    
private void Page_Load(object sender, System.EventArgs e)
    
{
        TTT(
"jeky");
    }


    
void TTT(string URL)
    
{
        
// 显示参数值
        HttpContext.Current.Response.Write ("<br />" + URL);
        
// 显示静态变量值
        HttpContext.Current.Response.Write ("<br />" + WebForm1.URL);
    }

}
posted @ 2006-03-28 11:13  jeky  阅读(357)  评论(1编辑  收藏  举报
友情链接:逗死了笑话网 | 网络记事本