Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
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
Creating and Using Attributes in your .NET application  Version: 0.00     Price: $0.00  
Total Hits: 16  |  Today: 0Author: 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....

Have Fun Again With Custom Attributes (Part 2)  Version: 0.00     Price: $0.00  
Total Hits: 21  |  Today: 0Author: Gael Fraiteur      Rating:  
Read Reviews | Write Review |  Your Rating: 

This is the second article in a series of two, with this one going into the details of the real-world implementation of custom attributes that actually add behaviors to your code, namely performance instrumentation and field validation.

* Read the first part of this article.

The first article of this series introduced some key concepts of PostSharp, based on a simple example: a tracing custom attribute derived from OnMethodBoundaryAspect. This article presents two more types of...

An attribute based approach to business object validation  Version: 0.00     Price: $0.00  
Total Hits: 25  |  Today: 0Author: Malisa Ncube      Rating:  
Read Reviews | Write Review |  Your Rating: 

This article shows how you can use attributes to validate your business objects. You may have had to write tones of code to validate your business objects without taking advantage of attributes. The value of attributes comes when you need to apply the same rules on a number of properties, and the only thing you have to do is to decorate your property accordingly. For other articles on attribute based validation, please check the Visual Studio Magazine and Simple Attribute Based Validation....

Attributes Inspector     
Total Hits: 56  |  Today: 0Author: Hzi      Rating:  
Read Reviews | Write Review |  Your Rating: 

I develop custom server controls in ASP.NET and C#, and one of my desperations is the integration of the controls in VS.NET designer surface. One of the problems is that I haven't found any simple application to see the custom attributes attached to types (ex: DesignerAttribute). I've searched documentation and I've written this simple application to do the job....

Getting a custom attribute     
Total Hits: 50  |  Today: 0Author: Scott Dorman      Rating:  
Read Reviews | Write Review |  Your Rating: 

Attribute programming has a lot of benefits and, when done correctly, can greatly simplify the amount of code that you need to write. One drawback to using attributes is that the code required to retrieve a custom attribute from a type is a bit cumbersome and is very repetitious....

Multile form tags with Runat=Server Attribute     
Total Hits: 71  |  Today: 0Author: Satheesh G      Rating:  
Read Reviews | Write Review |  Your Rating: 

When you ask an Asp.NET beginner (ofcourse guys with some .NET experience too), how many form tags can be kept on a single page, you get the answers like One, Any number of form tags but only one with runat=�server� attribute etc. However the fact is .NET allows you to put any number of form tags with runat=�server� attribute without getting runtime error By default page will never show any error though it has got more than one server side form tag at compile time, as...

DurableOperationAttribute Class     
Total Hits: 29  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

Specifies the local execution behavior of a durable service method. Durable service state information will be persisted when the operation has successfully been invoked. You cannot persist state information during the middle of operation execution as you can with workflow services....

How to: Use FlowDocument Column-Separating Attributes     
Total Hits: 28  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

The following example defines a FlowDocument, and sets the ColumnGap, ColumnRuleBrush, and ColumnRuleWidth attributes. The FlowDocument contains a single paragraph of sample content....

DataContractAttribute Class     
Total Hits: 60  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

Specifies that the type defines or implements a data contract and is serializable by a serializer, such as the DataContractSerializer. To make their type serializable, type authors must define a data contract for their type....

DataMemberAttribute Class     
Total Hits: 42  |  Today: 0Author: Microsoft Corporation      Rating:  
Read Reviews | Write Review |  Your Rating: 

When applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer. Apply the DataMemberAttribute attribute in conjunction with the DataContractAttribute to identify members of a type that are part of a data contract. One of the serializers that can serialize data contracts is the DataContractSerializer....

Using Custom Code Attributes for TDL Identification in Enterprise Templates     
Total Hits: 28  |  Today: 0Author: Steven Powell      Rating:  
Read Reviews | Write Review |  Your Rating: 

Visual Studio® .NET Enterprise Templates provides some methods of uniquely identifying classes and interfaces. Without making modifications to your sources, you can identify classes using base class or the interfaces implemented by that class. However, this method does not work when you need to uniquely identify a class that does not derive from a base class or that cannot be uniquely identified by base class; for example, when you must identify several classes that share a common base class. Fo...

Using ThreadStaticAttribute     
Total Hits: 167  |  Today: 0Author: sambeetpatra      Rating:  
Read Reviews | Write Review |  Your Rating: 

This is an attribute that indicates that the variable has one instance for each thread. This is a variation of the static variables. Static variables have one instance throughout the lifecycle of the program. A variable marked with [ThreadStatic] has one instance per thread in the program....


1  2  3  4  5  6  7  8  


Disclaimer - Privacy
© 2002-2012 DevASP.net