Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 557801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:03:53+00:00 2026-05-13T12:03:53+00:00

Possible Duplicate: Most Useful Attributes in C# I always feel that I am missing

  • 0

Possible Duplicate:
Most Useful Attributes in C#

I always feel that I am missing functionality that can be gained in .Net by simply applying attributes to classes, methods, properties etc. It doesn’t help that intellisense cannot display all appropriate attributes as they can normally be applied in a wide range of scenarios.

Here’s a couple of the attributes I like to use:

[DebuggerHidden] – placing this over methods prevents the Visual Studio debugger from stepping in to code. This is useful if you have an event that continually fires and interupts your debugging.

[EditorBrowsable(EditorBrowsableState.Never)] – Hide a method from intellisense. I don’t use this often, but it’s handy when building reusable components and you want to hide some test or debug methods.

I’d like to see what others are using and what tips people have.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:03:53+00:00Added an answer on May 13, 2026 at 12:03 pm

    I just found this resources:

    • Most Useful Attributes in C#
    • 5 Very Useful C# Attributes

     

    // The DebuggerDisplayAttribute can be a sweet shortcut to avoid expanding
    // the object to get to the value of a given property when debugging. 
    [DebuggerDisplay("ProductName = {ProductName},ProductSKU= {ProductSKU}")] 
    public class Product 
    { 
        public string ProductName { get; set; } 
        public string ProductSKU { get; set; } 
    }
    
    // This attribute is great to skip through methods or properties 
    // that only have getters and setters defined.
    [DebuggerStepThrough()] 
    public virtual int AddressId 
    { 
        get { return _AddressId;}     
        set 
        { 
            _AddressId = value;   
            OnPropertyChanged("AddressId"); 
        } 
    }
    
    // The method below is marked with the ObsoleteAttribute. 
    // Any code that attempts to call this method will get a warning.
    [Obsolete("Do not call this method.")]
    private static void SomeDeprecatedMethod() { }
    
    // similar to using a combination of the DebuggerHidden attribute, which hides
    // the code from the debugger, and the DebuggerStepThrough attribute, which tells
    // the debugger to step through, rather than into, the code it is applied to.
    [DebuggerNonUserCode()]
    private static void SomeInternalCode() { }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Do most browsers automatically search for the favicon.ico? Will a favicon.ico that
Possible Duplicate: What cross platform GUI library has the most native feel for each
Possible Duplicate: Disable copying data from webpage Most content in a webpage could be
Possible Duplicate: Why use document.write? Considering the negative effects of document.write(), why are most
Possible Duplicate: What does 'foo' really mean? I hope it is not the most
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How can I understand nested ?: operators in PHP? Why does this:
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Most efficent way of joining strings I have a List. What would
Possible Duplicate: Most vexing parse: why doesn't A a(()); work? I am having this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.