Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hide in IntelliSence

68 views
Skip to first unread message

Peter Larsen

unread,
Jun 26, 2006, 6:22:38 AM6/26/06
to
Hi,

I'm using Visual Studio 2005.

I want to hide a public property from IntelliSence. To do that i tried
EditorBrowsable, but it doesn't seem to change anything on IntelliSence -
the property it's still visible.

private Log.TraceLevel applicationTraceLevel = Log.TraceLevel.Error;

[EditorBrowsable(EditorBrowsableState.Never)]
public Log.TraceLevel ApplicationTraceLevel
{
get ...
set ...
}

What am i doing wrong ?

Thanks in advance.
BR
Peter

ps. Same question as before - but this time using my msdn posting alias ...


Linda Liu [MSFT]

unread,
Jun 27, 2006, 2:17:47 AM6/27/06
to
Hi Peter,

Thank you for posting.

Speaking for C#, the EditorBrowsableAttribute attribute only influences C#
IntelliSense filtering behavior if the decorated item is imported from
metadata.

That's to say, you should compile the EditorBrowsableAttribute-decorated
project(e.g project 1) into an assembly(.dll or .exe) and then in another
project(e.g project 2) add a reference to that assembly. In project 2, you
should see the attribute at work.

C# IntelliSense filtering behavior is not influenced if you are coding in
project 1. What's more, if you add a project-to-project reference to
project 1 in project 2, C# IntelliSense filtering behavior is not
influenced when you are coding in project 2 either.

The IDE is intended to filter items from consumers of your assembly and not
to filter items from yourself as you code the assembly.

Hope this helps.
If you have anything unclear, please don't hesitate to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================

Peter Larsen*

unread,
Jun 27, 2006, 6:31:30 AM6/27/06
to
Hi Linda and thanks for your time.

What you are saying is that if i create a solution containing one Windows
Application and one Library Class, the attribute added/used in the Library
Class, would NOT work in the Windows Application, because i added a
reference to the Library Class project instead of the DLL ??

BR
Peter


"Linda Liu [MSFT]" <v-l...@online.microsoft.com> wrote in message
news:CD$xwFbmG...@TK2MSFTNGXA01.phx.gbl...

Linda Liu [MSFT]

unread,
Jun 28, 2006, 3:07:32 AM6/28/06
to
Hi Peter,

Thanks for your response.

Yes, you are right.

If the Windows Application and the Library Class projects are all written
in C#, and you add a reference to the Library Class project in the Windows
Application project, the attribute would not work in the Windows
Application.

If the Windows project is written in C# and the library project is written
in VB.NET, the attribute works in the Windows project whether you add a
reference to the library project or just the assembly.

In addition, if the Windows project is written in VB.NET, the attribute
works in the Windows project whether the library project is written in C#
or VB.NET and whether you add a reference to the library project or just
the assembly.

Linda Liu [MSFT]

unread,
Jul 5, 2006, 5:26:54 AM7/5/06
to
Hi Peter,

I am closely monitoring the newsgroup and I am contacting you to check the
issue status.

If you have anything unclear, please feel free to post here and we will
follow up.

Thank you for using our MSDN Managed Newsgroup Support Service!


Sincerely,
Linda Liu
Microsoft Online Community Support

============================================================================
=============================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.

============================================================================
=============================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Peter Larsen []

unread,
Jul 5, 2006, 7:43:24 AM7/5/06
to
Hi Linda,

I think you have answered my question just fine.
Thank you.

BR
Peter

"Linda Liu [MSFT]" <v-l...@online.microsoft.com> wrote in message

news:uFP6vUBo...@TK2MSFTNGXA01.phx.gbl...

Linda Liu [MSFT]

unread,
Jul 6, 2006, 1:22:25 AM7/6/06
to
Hi Peter,

Thank you for your update. You're welcome!

If you have any questions in the future, please don't hesitate to contact
us. It's always our pleasure to be of assistace.

Have a nice day!

0 new messages