新手提问,不要见笑:新建一个用户控件,产生的源码内的[]是干什么用的?
using   System; 
 using   System.Collections.Generic; 
 using   System.ComponentModel; 
 using   System.Text; 
 using   System.Web; 
 using   System.Web.UI; 
 using   System.Web.UI.WebControls;   
 namespace   test002 
 { 
             [DefaultProperty( "Text ")]   //比如前面这个 
             [ToolboxData( " <{0}:WebCustomControl1   runat=server>  </{0}:WebCustomControl1>  ")]   //比如前面这个 
             public   class   WebCustomControl1   :   WebControl 
             { 
                         [Bindable(true)]         //比如前面这个 
                         [Category( "Appearance ")]   //比如前面这个 
                         [DefaultValue( " ")]   //比如前面这个 
                         [Localizable(true)]   //比如前面这个 
                         public   string   Text 
                         { 
                                     get 
                                     { 
                                                 String   s   =   (String)ViewState[ "Text "]; 
                                                 return   ((s   ==   null)   ?   String.Empty   :   s); 
                                     }   
                                     set 
                                     { 
                                                 ViewState[ "Text "]   =   value; 
                                     } 
                         }   
                         protected   override   void   RenderContents(HtmlTextWriter   output) 
                         { 
                                     output.Write(Text); 
                         } 
             } 
 } 
------解决方案--------------------这是对类,属性,方法等的Arribute属性的定义,主要实现的是设计时支持,比如{Category( "Appearance ")] 是在设计时的属性界面中将Text属性添加到Appearance节点下,类似的还是自定义类型属性的类型转换器,像Dock,Size,Anchor,ItemColloction,ImageColloction这些属性在设计时都有相应的类弄转换器来支持设计时的属性编辑,还是Browseable描述,可设定属性在设计时属性界面可见或不可见等等..
------解决方案--------------------参考   
 http://msdn2.microsoft.com/zh-cn/library/5x6cd29c(VS.80).aspx
------解决方案--------------------Arribute和Property都翻译成 属性了
------解决方案--------------------这个[]号叫特性(Arribute)       
 [DefaultProperty( "Text ")]//控件默认属性