Which attribute should you use?

You are creating a Windows Forms application by using the .NET Framework 3.5.
You plan to design a composite custom control for the application.
You include a ListBox control inside the composite control. The control exposes a property that provides the item count of the ListBox control.
You need to ensure that the property cannot be accessed at design time.
Which attribute should you use?

You are creating a Windows Forms application by using the .NET Framework 3.5.
You plan to design a composite custom control for the application.
You include a ListBox control inside the composite control. The control exposes a property that provides the item count of the ListBox control.
You need to ensure that the property cannot be accessed at design time.
Which attribute should you use?

A.
[Bindable(false)]

B.
[DesignOnly(false)]

C.
[EditorBrowsable(EditorBrowsableState.Never)]

D.
[Browsable(false)]



Leave a Reply 0

Your email address will not be published. Required fields are marked *