|
|
|
|
|
Total Hits: 44 | Today: 0
|
Author: Ahmed Yassin
|
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....
|
|
|
|
Total Hits: 267 | Today: 0
|
Author: Robbe D. Morris
|
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...
|
|
|
|
Total Hits: 725 | Today: 0
|
Author: Joydip Kanjilal
|
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....
|
|
|
|
Total Hits: 28 | Today: 0
|
Author: Lim Bio Liong
|
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...
|
|
|
|
Total Hits: 37 | Today: 0
|
Author: sadaf alvi
|
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....
|
|
|
|
Total Hits: 26 | Today: 0
|
Author: Joseph Finsterwald
|
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....
|
|
|
|
Total Hits: 39 | Today: 0
|
Author: Chris Rogers
|
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 ...
|
|
|
|
Total Hits: 209 | Today: 0
|
Author: Kavitha Pradeep
|
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...
|
|
|
|
Total Hits: 307 | Today: 0
|
Author: Rajadurai .P
|
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....
|
|
|
|
Total Hits: 1325 | Today: 0
|
|
Rating:
|
|

A simple class (DALQueryBuilder, see source code in the last article) that would make me type less code to update an object....
|
|
|
|
Total Hits: 853 | Today: 0
|
Author: Gaurav Mantro
|
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...
|
|
|
|
Total Hits: 14 | Today: 0
|
Author: Jonathan de Halleux
|
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...
|
|
|
|
Total Hits: 216 | Today: 0
|
Author: Scott Guthrie
|
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 ...
|
|
|
|
Total Hits: 366 | Today: 0
|
Author: Ali Sufyan
|
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...
|
|
|
|
Total Hits: 342 | Today: 0
|
Author: Ashish Banerjee
|
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....
|
|
|
|
Total Hits: 313 | Today: 0
|
Author: Deepak Dutta
|
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....
|
|
|
|
Total Hits: 39 | Today: 0
|
Author: travis30
|
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....
|
|
|
|
Total Hits: 24 | Today: 0
|
Author: Ennis Ray Lynch, Jr.
|
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 ...
|
|
|
|
Total Hits: 18 | Today: 0
|
Author: James T. Johnson
|
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....
|
|
|
|
Total Hits: 58 | Today: 0
|
Author: Dan Bunea.
|
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....
|
|
|
|
|
|