473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

Jan 11 '07 #1
6 1140
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
Jan 11 '07 #2
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.
Jan 11 '07 #3
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-kwrote in message
news:eo**********@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.

Jan 11 '07 #4
Hi Phill,
i tried this,

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

End Sub
// C#
[System.ComponentModel.EditorBrowsable(System.Compo nentModel.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-kwrote in message
news:eo**********@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.
Jan 11 '07 #5
In the VB version below, either it's a typo, or you
need an underscore after the to indicate continuation.

Robin S.
------------------------------------
"Lucky" <tu************@gmail.comwrote in message
news:11*********************@p59g2000hsd.googlegro ups.com...
Hi Phill,
i tried this,

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

End Sub
// C#
[System.ComponentModel.EditorBrowsable(System.Compo nentModel.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-kwrote in message
news:eo**********@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.

Jan 11 '07 #6
Hmm,

I've used this attribute with c# and it worked perfectly for me as far as I
remember.
--
Stoitcho Goutsev (100)

"Lucky" <tu************@gmail.comwrote in message
news:11*********************@p59g2000hsd.googlegro ups.com...
Hi Phill,
i tried this,

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

End Sub
// C#
[System.ComponentModel.EditorBrowsable(System.Compo nentModel.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-kwrote in message
news:eo**********@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.

Jan 11 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Lucky | last post by:
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...
6
by: Lucky | last post by:
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...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.