hiding public methods in the DropdownList.

  • Thread starter Thread starter Lucky
  • Start date Start date
L

Lucky

hi guys!

again with some interesting Question.

i've some public methods in class. i dont want to show this methods in
the dropdown list while you are typing the code in .net IDE (it long
story that why i dont need those methods in the list).
i guess there are some arrtibutes those can prevent showing method in
the popuped dropdown list but as i dont have much idea about this
attributes, i need your expert help on this.

please let me know if you know how can i do this or may be some other
resource that can help me to find out the way of doing.

thanks,
Lucky
 
Lucky said:
i've some public methods in class. i dont want to show this methods in
the dropdown list while you are typing the code in .net IDE (it long
story that why i dont need those methods in the list).

Yes, you can do this but - why would you have /Public/ methods that you
don't want to show to people trying to /use/ your class?

Regards,
Phill W.
 
Phill,

The attribute you are looking for is called EditorBrowsableAttribute
 
Hi Phill,
i tried this,

'VB
<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>
Public Sub myHiddenMethod()

End Sub


// C#
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void myHiddenMethod()
{
}

but unfortunately in c# this attribute fails to hide methods. i dont
know why. i'm still workin on it.

Lucky
 
In the VB version below, either it's a typo, or you
need an underscore after the > to indicate continuation.

Robin S.
------------------------------------
Lucky said:
Hi Phill,
i tried this,

'VB
<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>
Public Sub myHiddenMethod()

End Sub


// C#
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void myHiddenMethod()
{
}

but unfortunately in c# this attribute fails to hide methods. i dont
know why. i'm still workin on it.

Lucky
 
Hmm,

I've used this attribute with c# and it worked perfectly for me as far as I
remember.


--
Stoitcho Goutsev (100)

Lucky said:
Hi Phill,
i tried this,

'VB
<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>
Public Sub myHiddenMethod()

End Sub


// C#
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public void myHiddenMethod()
{
}

but unfortunately in c# this attribute fails to hide methods. i dont
know why. i'm still workin on it.

Lucky
 
Back
Top