上班一个多星期了,但是,还是让我“熟悉环境和业务”,很少给我任务。于是,自己看项目代码。有很多不理解和陌生的地方,总结如下:

1.为什么不是Page_Load(),ProcessPage_Load()是什么意思?

protected override void ProcessPage_Load(object sender, EventArgs e)
{
   
//code
}

好像是自定义事件。

            PrePage_Load(sender, e);
            ProcessPage_Load(sender, e);
            AfterPage_Load(sender, e);

2.IDictionary的用法有点奇怪,IDictionary是个接口,接口的用法不是加“:”来继承吗?接口类型的数据?

 value;
            }
        }

 3. [Serializable]

在一个类的声明的前面,加[Serializable]表示这个类可以被序列化。如果一个类能被序列化,那么他的所有成员变量都应该是可以被序列化的。至于什么是序列化,暂且不管。

[Serializable]
class A
{
}

4. as用于在兼容的引用类型之间执行转换。

例如:

string s = someObject as string;
if (s != null)
{
    // someObject is a string.
}

as 运算符类似于强制转换操作;但是,如果转换不可行,as 会返回 null 而不是引发异常。更严格地说,这种形式的表达式

expression as type    等效于    expression is type ? (type)expression : (type)null

只是 expression 只被计算一次。

        /// <summary>
        
/// CSA用户表 Interface
        
/// </summary>
        public static ICsaUserBiz iCsaUserBiz = ContainerAccessorUtil.GetContainer()["CCLOG.CsaUserBiz"as ICsaUserBiz;

5. IList<>的意思?IList是列表,IList<AAA>表示这个列表里面放AAA类型的实例。

IList是接口,IList<>是泛型。

IList可以理解为顶层接口 ,比如 list,ArrayList都是继承他的。

IList ilist = new list();
Ilist <> 里面是泛型,说明你里面装的什么 。可以装实例,也可以装基本类型。
Ilist <string> ilist= new list <string>();

 SelectAllByQueryString(String filter);

6. IsClientScriptBlockRegistered

, js);
            }

链接:http://zhidao.baidu.com/question/52092132.html?si=1

7. FindControl

 attachmentModel.Id;
            }
        }

 8. HiddenField

                 if (Session["MenuId"!= null)
                {
                    txtHiddenMenuId.Value 
= Session["MenuId"].ToString();
                }

http://zhidao.baidu.com/question/69402024.html

相关文章:

  • 2021-11-06
  • 2021-06-05
  • 2021-11-26
  • 2021-10-26
  • 2022-01-13
  • 2021-12-11
  • 2022-02-15
  • 2021-12-30
猜你喜欢
  • 2021-12-15
  • 2021-05-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-09-30
  • 2022-01-06
相关资源
相似解决方案