Search   Articles   Dev Forums   Personalize   Favorites   Member Login   ASP.Net Hosting
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Sunday, May 18, 2008

Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 
FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase

Home > Search > Articles & Samples > C-Sharp > Attributes
Search:
What's New - What's Hot

Assembly Attributes        
Total Hits: 44  |  Today: 0 Author: Ahmed Yassin       Rating:  
Read Reviews | Write Review |              Your Rating: 

Reflection allows you to programmatically inspect an assembly, and get information about the assembly, including all object types contained within. This information includes the attributes you have added to those types. The reflection objects reside within the System.Reflection namespace....

Map DataTable DataColumn To Class Properties Using Custom Attributes in C# / ADO.NET        
Total Hits: 267  |  Today: 0 Author: Robbe D. Morris       Rating:  
Read Reviews | Write Review |              Your Rating: 

There is nothing quite like laziness to drive a self starter. I've been looking for a way to speed up the development of the data access layers I've been writing. Particularly in the area of populating class properties with the results returned from a DataTable and I really didn't want to mess with strongly typed DataSets. Plus, you really can't encapsulate business logic. In many cases, you wouldn't want to do this anyway but in some instances (and I have a few) it makes good sense. Our UI...

Attributes and Reflection in C#        
Total Hits: 725  |  Today: 0 Author: Joydip Kanjilal       Rating:  
Read Reviews | Write Review |              Your Rating: 

Attributes are a mechanism for adding metadata. Reflection is the process by which a program can read its own metadata. This article discusses both these concepts in detail with examples wherever necessary....

Demonstrating Custom Attributes: Build An Assembly Searching Tool.        
Total Hits: 28  |  Today: 0 Author: Lim Bio Liong       Rating:  
Read Reviews | Write Review |              Your Rating: 

Standard .NET attributes serve functionality similar to C++ preprocessor or pragma commands. They can be used to provide to the compiler additional information pertaining to some item in a program. They can be used to simplify certain programming tasks, e.g. setting security requirements declaratively (CodeAccessSecurityAttribute), controlling the physical layout of the data fields of a class or structure (StructLayoutAttribute), setting COM GUIDs to .NET classes (GuidAttribute), etc. They can e...

Attributes in C#        
Total Hits: 37  |  Today: 0 Author: sadaf alvi       Rating:  
Read Reviews | Write Review |              Your Rating: 

Attributes are a new kind of declarative information. We can use attributes to define both design-level information (such as help file, URL for documentation) and run-time information (such as associating XML field with class field). We can also create "self-describing" components using attributes. In this tutorial we will see how we can create and attach attributes to various program entities, and how we can retrieve attribute information in a run-time environment....

Casting from a Collection to a Data Table using Generics and Attributes        
Total Hits: 26  |  Today: 0 Author: Joseph Finsterwald       Rating:  
Read Reviews | Write Review |              Your Rating: 

The following step by step example will demonstrate how you can use Aspect Oriented Programming (AOP) to cast a collection of objects into a DataTable. This particular example will leverage the power of attributes, generics, and reflection to explicitly convert a collection of container classes into a DataTable.

I should state for the record that this article was inspired in part by a cogent book on the topic: Applied .NET Attributes by Jason Bock and Tom Barnaby....

Using Attributes and RealProxy to perform property level processing        
Total Hits: 39  |  Today: 0 Author: Chris Rogers       Rating:  
Read Reviews | Write Review |              Your Rating: 

One of the great challenges in development, irrespective of the language and style, is reduction of duplicate code. Some of the most duplicative code I tend to see is in property setters and getters. If you think of all the various things that could be happening in your gets and sets; data validation, change history, data security; it’s not really a surprise. In this document, I will explain how to use proxy classes and attributes to intercept method calls to set and get statements, and perform ...

Programming with Attributes        
Total Hits: 209  |  Today: 0 Author: Kavitha Pradeep       Rating:  
Read Reviews | Write Review |              Your Rating: 

Every software developer at one time or the other would have felt "How I wish I was a hardware engineer?" . If we had the luxury of having a "software circuit" like the hardware circuit, where a small part can be replaced very easily it would have been a path to software success in totality today. To achieve a level of success in "software circuitry" we have been programming using varied programming techniques and have come a long way from structured approach to object oriented approach. Attribu...

Usage of Attributes in C#        
Total Hits: 307  |  Today: 0 Author: Rajadurai .P       Rating:  
Read Reviews | Write Review |              Your Rating: 

This article shows how to create custom attribute classes, use them in code, and query them. 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....

A Data Access Layer to persist business objects using attributes and reflection - Part I        
Total Hits: 1325  |  Today: 0       Rating:  
Read Reviews | Write Review |              Your Rating: 

A simple class (DALQueryBuilder, see source code in the last article) that would make me type less code to update an object....

Custom Attributes in C# (C Sharp)        
Total Hits: 853  |  Today: 0 Author: Gaurav Mantro       Rating:  
Read Reviews | Write Review |              Your Rating: 

Custom Attribute is a very powerful feature of C#, this article explains working of Custom Attribute and follows by code sample on how to write a custom attribute and use it in your code...

Make NDoc compile the code examples contained in your documentation using NLiterate        
Total Hits: 14  |  Today: 0 Author: Jonathan de Halleux       Rating:  
Read Reviews | Write Review |              Your Rating: 

NLiterate is a tool that allows to write C# documentation in the Literate Programming Style (LPS). It merges, compiles and runs the code snippets contained in the comments, keeping the documentation and the source code synchronized. NLiterate comes as a custom documenter for NDoc (see [3]), so you easily use it through the NDoc GUI.

Disclaimer: The intention of NLiterate is not to replace the C# code, far from that. It mainly is a tool to automate the compilation of code examples containe...

Tip/Trick: Adding Authorization Rules to Business and Data Layers using PrincipalPermissionAttributes        
Total Hits: 216  |  Today: 0 Author: Scott Guthrie       Rating:  
Read Reviews | Write Review |              Your Rating: 

In this article, Scott demonstrates how to add authorization rules to business and data layers using PrincipalPermissionAttributes.
Earlier this summer I posted two tutorials on using Windows Authentication with ASP.NET: Enabling Window Authentication within an Intranet ASP.NET Web Application and Implementing Role Based Security within ASP.NET using Windows Authentication and SQL Server. I also linked to Scott Mitchell's great ASP.NET 2.0 Security, Membership and Roles Tutorials that cover ...

How to Use Attributes in C#        
Total Hits: 366  |  Today: 0 Author: Ali Sufyan       Rating:  
Read Reviews | Write Review |              Your Rating: 

Usinng an attribute is a way to add special meaning to our method and cause it to act in a certain way. Before this was available, developers didn't have a way to define their own attributes. DotNet paved the way for developers and opened new horizons to conquer. Attributes are like adding behaviours to methods, classes, properties structures, events, modules, and so forth. It means we can enforce certain constraints on those methods, classes, properties and vice-versa to behave in the way speci...

There is a Hook in My C#        
Total Hits: 342  |  Today: 0 Author: Ashish Banerjee       Rating:  
Read Reviews | Write Review |              Your Rating: 

As an extension to the J++ design practice, C# has a syntactic construct, called Attributes, which let you drop hooks to Windows API or modify the runtime semantics, like threading synchronization behavior. The C# has legalized the hooking practice by calling them Attributes, and including them in ECMA C# specification....

Attributed Programming in .NET Using C#        
Total Hits: 313  |  Today: 0 Author: Deepak Dutta       Rating:  
Read Reviews | Write Review |              Your Rating: 

An attribute is a new code level language construct in all major .NET languages. It provides integration of declarative information to assemblies, classes, interfaces, members, etc. at the code level. The information can then be used to change the runtime behavior or collect organizational information. In this article, I illustrate the power of attributed programming by examples that show a modular approach to issues that can crosscut many classes....

The PropertyGrid: Overriding Class Attributes        
Total Hits: 39  |  Today: 0 Author: travis30       Rating:  
Read Reviews | Write Review |              Your Rating: 

The DynamicPropWrapper class wraps an existing class and filters the property information that the .NET PropertyGrid displays. The purpose for this is mainly to control the ReadOnly and DefaultValues for each property dynamically in the code. Other features include dynamic modification of the Categories, Descriptions, DisplayNames, Property sorting order and more....

Simple Attribute Based Validation        
Total Hits: 24  |  Today: 0 Author: Ennis Ray Lynch, Jr.       Rating:  
Read Reviews | Write Review |              Your Rating: 

This quick introduction will provide the tools required to generate your own attribute based validation scheme. The methods presented here (though I have not had an opportunity to test them in production) seem to offer a powerful and simple method for validating objects. The original design was to validate against a database before allowing a save that would fail, however, in testing and tweaking I soon discovered that I could add more powerful business level validation attributes. I will leave ...

Creating and Using Attributes in your .NET application        
Total Hits: 18  |  Today: 0 Author: James T. Johnson       Rating:  
Read Reviews | Write Review |              Your Rating: 

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

An OO Persistence Approach using Reflection and Attributes in C#        
Total Hits: 58  |  Today: 0 Author: Dan Bunea.       Rating:  
Read Reviews | Write Review |              Your Rating: 

Being a J2EE developer in the past and a very big fan of OOD , I started a few months ago to work in .NET. Now I have seen the .NET data persistence approach, the DataSets, the DataReaders and DataAdapters in ADO.NET, which I consider very powerful when working with more that one record in a table, but I still like using Business Objects in my design, so I wrote a small persistence framework for .NET....


1  2  Next >> 


DevASP.Net - Disclaimer - Privacy
Copyright © 2008 DevASP.net