473,468 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1142
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

11
by: Lorenzo Villari | last post by:
I premise I don't know C++ well but... I wondered what is this data hiding thing... I mean, if I can look at the header (and i need it beacuse of the class), then what's hidden? Can someone give...
7
by: Tron Thomas | last post by:
Under the right compiler the following code: class Base { public: virtual void Method(int){} }; class Derived: public Base {
4
by: Howie | last post by:
Hi, i have a normal class: //test.h class CForwardData; class CTest { CForwardData *pData;
13
by: Ranginald | last post by:
I am new to oop so please bear with me: Could someone please explain to me why the "protected void runCategory() method" cannot access the local ddlCategory object that is easily accessed in...
10
by: Bruce | last post by:
I posted this on the dotnet.languages.vc group but did not get a response. I figure that I could apply what I learn from CSharp to VC, so here goes. I have a class in a class assembly, that...
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...
9
by: Torben Laursen | last post by:
Hi I have a class that I use in Excel to define some custom functions. The problem that I have is that the class also has some building functions that for some reason is there: ToString...
11
by: Aflj | last post by:
This code won't compile (two compilers tried, gcc and VC++, both of recent versions, but I don't remember them exactly): class C1 { public: void M1(int i) {} }; class C2: public C1
0
by: Frank | last post by:
Hi, I have read the other post about hiding the updatepanel using the ajax lifecycle as such at the end of the aspx page: <script type="text/javascript" language =javascript> var c = new...
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.