PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
hiding public methods in the DropdownList.
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
hiding public methods in the DropdownList.
![]() |
hiding public methods in the DropdownList. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#5 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#6 |
|
Guest
Posts: n/a
|
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. > |
|
|
|
#7 |
|
Guest
Posts: n/a
|
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. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

