jjzjj

theDescriptorBrowsableAttribute

全部标签

c# - 条件 "Browsable"属性

有没有一种方法可以使“可浏览”属性成为条件属性,以便应用它的属性有时会出现在属性页面中,有时不会出现?谢谢:) 最佳答案 我不确定这是否适用于您的情况,但您可以通过调用以下函数在运行时调整“可浏览”装饰。//////SettheBrowsableproperty.///NOTE:Besuretodecoratethepropertywith[Browsable(true)]//////Nameofthevariable///BrowsableValueprivatevoidsetBrowsableProperty(stringstr