zoukankan      html  css  js  c++  java
  • [Browsable(false)]

    [Browsable(false)]

    1.c#方法上面的[Browsable(false)]是干吗用的?

    答案:标明此对象不可被浏览,这样它就不会出现在设计器的属性窗口里了

    看如下代码:

       /// <include file='AspNetPagerDocs.xml' path='AspNetPagerDoc/Property[@name="ImagePath"]/*'/>
            [Browsable(true), Category("Appearance"), ANPDescription("desc_ImagePath"), DefaultValue(null)]
            public string ImagePath{
                get {
                    if (null != cloneFrom)
                        return cloneFrom.ImagePath;
                    string imgPath = (string)ViewState["ImagePath"];
                    if (imgPath != null)
                        imgPath = ResolveUrl(imgPath);
                    return imgPath;
                }
                set{
                    string imgPath = value.Trim().Replace("\\", "/");
                    ViewState["ImagePath"] = (imgPath.EndsWith("/")) ? imgPath : imgPath + "/";
                }
            }
  • 相关阅读:
    HTML的基本骨架
    2017.7.27
    2017.7.26
    2017.7.25
    2017.7.24
    2017.7.22
    2017.7.21
    Javascript Step by Step
    Javascript Step by Step
    Javascript Step by Step
  • 原文地址:https://www.cnblogs.com/grj001/p/12224400.html
Copyright © 2011-2022 走看看