Learn about dot net attributes

Page 1

Learn about .NET Attributes

July 26, 2016.net training institute, Computer Training .net certification in pune, .net classes, .net courses, .net courses in pune, .net jobs, .net technology, .net training, .net training institute pune, ASP.net courses Assemblies are the building blocks of .NET Framework ; they form the basic unit of deployment, reuse, version control, reuse, activation scoping and security permissions. An assembly is a collection of types and resources that are created to work together and form a functional and logical unit.

.NET assemblies are self-describing, i.e. information about an assembly is stored in the assembly itself. This information is called Meta data. .NET also allows you to put additional information in the meta data via Attributes. Attributes are used in many places within the .NET framework.

This page discusses what attributes are, how to use inbuilt attributes and how to customize attributes.

Define .NET Attributes

A .NET attribute is information that can be attached with a class, an assembly, property, method and other members. An attribute bestows to the metadata about an entity that is under consideration. An attribute is actually a class that is either inbuilt or can be customized. Once created, an attribute can be applied to various targets including the ones mentioned above.

For better understanding, let’s take this example:

[WebService]public class WebService1 : System.Web.Services.WebService { [WebMethod]


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.