PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms hiding public methods in the DropdownList.

Reply

hiding public methods in the DropdownList.

 
Thread Tools Rate Thread
Old 11-01-2007, 01:36 PM   #1
Lucky
Guest
 
Posts: n/a
Default hiding public methods in the DropdownList.


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

  Reply With Quote
Old 11-01-2007, 01:59 PM   #2
cbmeeks
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

uh....make then private instead of public??

cbmeeks
http://www.codershangout.com


Lucky wrote:
> 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


  Reply With Quote
Old 11-01-2007, 02:02 PM   #3
Phill W.
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

Lucky wrote:

> 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.
  Reply With Quote
Old 11-01-2007, 03:27 PM   #4
Stoitcho Goutsev \(100\)
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

Phill,

The attribute you are looking for is called EditorBrowsableAttribute


--
HTH
Stoitcho Goutsev (100)

"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message
news:eo5g0t$cd1$3@south.jnrs.ja.net...
> Lucky wrote:
>
>> 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.



  Reply With Quote
Old 11-01-2007, 03:33 PM   #5
Lucky
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

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

Stoitcho Goutsev (100) wrote:
> Phill,
>
> The attribute you are looking for is called EditorBrowsableAttribute
>
>
> --
> HTH
> Stoitcho Goutsev (100)
>
> "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message
> news:eo5g0t$cd1$3@south.jnrs.ja.net...
> > Lucky wrote:
> >
> >> 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.


  Reply With Quote
Old 11-01-2007, 04:42 PM   #6
RobinS
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

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

Robin S.
------------------------------------
"Lucky" <tushar.n.patel@gmail.com> wrote in message
news:1168529621.340903.57690@p59g2000hsd.googlegroups.com...
> 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
>
> Stoitcho Goutsev (100) wrote:
>> Phill,
>>
>> The attribute you are looking for is called EditorBrowsableAttribute
>>
>>
>> --
>> HTH
>> Stoitcho Goutsev (100)
>>
>> "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message
>> news:eo5g0t$cd1$3@south.jnrs.ja.net...
>> > Lucky wrote:
>> >
>> >> 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.

>



  Reply With Quote
Old 11-01-2007, 06:17 PM   #7
Stoitcho Goutsev \(100\)
Guest
 
Posts: n/a
Default Re: hiding public methods in the DropdownList.

Hmm,

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


--
Stoitcho Goutsev (100)

"Lucky" <tushar.n.patel@gmail.com> wrote in message
news:1168529621.340903.57690@p59g2000hsd.googlegroups.com...
> 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
>
> Stoitcho Goutsev (100) wrote:
>> Phill,
>>
>> The attribute you are looking for is called EditorBrowsableAttribute
>>
>>
>> --
>> HTH
>> Stoitcho Goutsev (100)
>>
>> "Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message
>> news:eo5g0t$cd1$3@south.jnrs.ja.net...
>> > Lucky wrote:
>> >
>> >> 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.

>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off