请ASP.net高手看看这个

来源:百度知道 编辑:UC知道 时间:2024/06/17 01:11:03
/// <summary>
/// 获取用户名
/// </summary>
static public string GetUserName
{ get
{ return (HttpContext.Current.Request.QueryString["username"] == null) ? null : (StringUtil.InputText(System.Web.HttpContext.Current.Request.QueryString["username"],10));
}
}

1、static public 这样用和 public static有什么区别
2、这是方法,还是函数呀?怎么没有用()号而是用的{}?
3、{get{return}} 是什么意思呀?

1、static public 这样用和 public static有什么区别
没区别

2、这是方法,还是函数呀?怎么没有用()号而是用的{}?
不是方法,不是函数,是属性

3、{get{return}} 是什么意思呀?
返回值