zoukankan      html  css  js  c++  java
  • [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 + "/";
                }
            }
  • 相关阅读:
    随笔练习
    获得屏幕相关的辅助类
    C# 下sqlite简单使用
    XP系统下 VS2010 选中行崩溃
    Custome Buble Data Point
    RIA
    Chart Style
    d3js
    TreeView
    [Java入门笔记] Java语言简介
  • 原文地址:https://www.cnblogs.com/ChineseMoonGod/p/5203695.html
Copyright © 2011-2022 走看看