System.Attribute Class
Information   Base Types   Related Resources

Base class for custom attributes.

  • Namespace: System
  • First seen in: .NET v1.0.3705
  • Last seen in: .NET v1.1.4322
  • Last changed in: .NET v1.0.3705
  • Assembly: mscorlib.dll

  • System.Object
  • View this type on MSDN
  • View this type on WinFX 247
    Articles (16)Discussions (106)MembersRotorChanges
    Articles

    Page: 1
    A Data Access Layer to Persist Business Objects Using Attributes and Reflection
    The Code Project
    Then I came up with the idea of creating classes that would say how they should be persisted in the database. I would use attributes to say what database table my object should be persisted to, as well as other attributes to say what are the properties that should be mapped to table columns. From now on to update my code after a change in the solution I would only change the business object class.
    An Introduction to Custom Attributes and Reflection in VB.NET
    dotnet.za.net
    .NET provides a totally new language construct called "Attributes". Attributes allow the developer to specify information about a class, method, parameter etc. This information could change runtime behaviour, provide details about the usage of a class, or expose organisational information to the development team. Custom attributes allow the programmer to specify custom details about a programming construct that is both directly visible and available when reading the code (as a comment is), but is also available through the .NET framework.
    Attributes in .NET
    C#Today
    Developers have traditionally been adopting a functional approach to programming. Everything is a function or method, and functionality is explicitly asked for. While this works for building a monolith style application, component based programming doesnt exactly fit into this methodology. Loosely coupled systems are now being advocated over closely coupled systems. Furthermore, declarative and attribute based programming is gaining popularity where attributes can be declared on a class that annotate the behavior of the code and communicate this to the runtime and other objects. The .NET framework brings mainstream attribute based programming to the Windows environment by allowing the use of predefined and custom attributes on classes, and most code elements. In this article, we will look into the support that the .NET framework provides for attribute based programming and we will demonstrate the use of custom attributes by building a sample application that can trace all calls to your component by merely declaring a single attribute.
    C# From a Java Developer's Perspective
    http://www.25hoursaday.com/
    What follows is an overview of similarities and differences between the language features and libraries of the C# and Java programming languages based on my experience using both languages. All code snippets below were tested on Microsoft's .NET Framework Beta 2 for C# snippets and Java™ 2, Standard Edition (J2SE™) version 1.4 Beta 2 for the Java snippets.
    Creating and Using Attributes
    The Code Project
    In this article I hope to show you what attributes are, how to use existing attributes, and how to create your own attributes to use in your own projects.
    Creating and Using Attributes in your .NET application
    The Code Project
    In this article I hope to show you what attributes are, how to use existing attributes, and how to create your own attributes to use in your own projects.
    Custom Attributes with .NET
    DotNetNut
    Write custom attributes for code documentation. Get yourself acquainted with attributes, how they work, how to apply them, and how to read them from assembly metadata. This article will open your eyes to how .NET uses attributes and the possible use of attributes in your own applications.
    Declarative Transactions using ADO.NET and Without Enterprise Services
    The Code Project
    Sometimes it is nice to prototype up a simple database application. This code may help, by providing the automatic transactional model of COM+ in a non-COM+ environment. This example uses "Interception" to provide automatic transactioning support for non-COM+ classes.
    Exposing Type Information
    C#Today
    In his previous article, Morgan Skinner looked at the TypeDescriptor class, and how it could be used to retrieve various pieces of information from a type (or object). In certain situations however, you might want to augment or bypass the information returned from the TypeDescriptor, and in order to do this you need to implement the ICustomTypeDescriptor interface on your type. In this article, Morgan examines the ICustomTypeDescriptor interface, and show some examples of where it might be used, such as to to construct a list of properties on the fly when reading records from a database and displaying them on screen. Using the ICustomTypeDescriptor interface, it is possible to give each record its own list of properties, which might be useful if you want to permit or deny access to those properties based on some row level security settings.
    How to Configure Default Values in .NET Classes
    The Code Project
    This article describes how to setup default values of the value type fields in the .Net class using the Custom Attribute from the Application Assembly or Config file.
    Investigating Code Snippet Technology
    MSDN
    Examines the process of building and registering custom code expansions with your Microsoft .NET IDE of choice.
    Object Serialization and OO Techniques
    Visual Studio Magazine
    XML Serialization presents an excellent mechanism for working with XML documents in an object-oriented manner. In the June/July issue I discussed how using XML serialization in the IBuySpy Portal site (www.ibuyspy.com) simplified working with configuration files (see Links). Now I'll demonstrate how to leverage XML serialization techniques to manipulate the web.config file using object-oriented techniques rather than the Document Object Model (DOM).
    Oh Behave! - Attributes in .NET
    Developer Network Journal
    According to my old school dictionary, the verb ‘attribute’ means ‘to consider as belonging to’, while the noun means ‘a quality or property inseparable from an item’. In Windows programming, the term ‘attribute’ is used by many technologies, and with the release of the .NET framework you’ll find it used even more. In general, an attribute is a property of an item which forms part of its description and defines some aspect of its behaviour.
    Structuring a .NET Application For Easy Deployment
    MSDN
    How to plan and design for application deployment options presented in the Microsoft .NET Framework.
    Usage of Attributes in C#
    C# Help
    Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be queried at run time and used in any number of ways.
    Working With C# Custom Attributes
    C# Help
    Ad
    MBR BootFX
    Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
     
     Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
    Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com