|
|
|
|
|
Total Hits: 387 | Today: 0
|
Author: Steven Roman, Ph.D., Ron Petrusha, Paul Lomax
|
Rating:
|
|

The Visual Basic compiler and .NET platform automatically recognize the meaning of the attributes based on attribute classes in the .NET Framework Class Library. This recognition isn't true, however, for custom attributes. Thus, not only must you define them, you must also develop a set of routines that will identify the presence of an attribute so your code can handle them. NET assemblies are self-describing; when the compiler creates the .NET assembly, it writes metadata describing the assembl...
|
|
|
|
Total Hits: 346 | Today: 0
|
Author: Steven Roman, Ph.D., Ron Petrusha, Paul Lomax
|
Rating:
|
|

Attributes are declarative tags that can be used to annotate types or class members, thereby modifying their meaning or customizing their behavior. This descriptive information provided by the attribute is stored as metadata in a .NET assembly and can be extracted either at design time or at runtime using reflection....
|
|
|
|
Total Hits: 314 | Today: 0
|
Author: Steven Roman, Ph.D., Ron Petrusha, Paul Lomax
|
Rating:
|
|

An attribute is merely a class that inherits from System.Attribute, which makes it very easy to implement a custom attribute. In this section, we'll build a custom attribute called , which allows a developer to add assorted information (the developer's name, the date, a comment, and whether a code modification was a response to a bug) to code....
|
|
|
|
Total Hits: 3544 | Today: 0
|
Author: DevASP
|
Rating:
|
|

This article is about how you can get and set the attributes of a file like Read only, Hidden, System....
|
|
|
|
Total Hits: 342 | Today: 0
|
|
Rating:
|
|

In the following code snippets we'll cover how to get the properties of your object at run time. This can be handy to know if you're going to generate dynamic reports, or some other function of dynamically viewing and assigning values of the properties of an object....
|
|
|
|
Total Hits: 251 | Today: 0
|
Author: Ted Pattison
|
Rating:
|
|

One of the most powerful aspects of the Microsoft® .NET Framework is its support for attributes. Attribute-based programming is extremely powerful because it adds a declarative dimension to designing and writing software. Declarative programming provides an elegant new way for developers to leverage services and functionality from reusable libraries and frameworks as well as from developer tools, such as the Visual Basic® .NET compiler. As a user of Visual Basic .NET, it's essential that you und...
|
|
|
|
Total Hits: 202 | Today: 0
|
Author: Ken Spencer
|
Rating:
|
|

I'm trying to decide which Microsoft® .NET-compliant language to use to build my applications. I know one of the advantages of C# is the ability to comment code and turn those comments into XML docs. If I use Visual Basic® .NET, can I still do this? It's been obvious to me that with a little work, a cool documentation facility could be added to Visual Basic .NET. Recently, I found the time to dig into it. As luck would have it, I just picked up a copy of Matt Tagliaferri's book, Visual Basic...
|
|
|
|
Total Hits: 315 | Today: 0
|
Author: Peter McMahon
|
Rating:
|
|

Visual Basic.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 commen...
|
|
|
|
Total Hits: 402 | Today: 0
|
Author: Paul Kimmel.
|
Rating:
|
|

You can define a class in any project and any source file. Technically, attributes are just classes. However, because you use attributes to decorate elements of code, you may want to use them in more than just one particular project. For this reason, it's a good idea to create attributes in a separate class library assembly. You can use the Class Library project template to create a new class library project. The Class Library project template uses the Wizard Engine to make a copy of a .vb file ...
|
|
|
|
Total Hits: 8 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

This example reads the attributes rendered for a TextBox Web server control and an HtmlInputButton control. The code reads the Keys collection of the AttributeCollection object of each individual control. For each key item, the code extracts the corresponding value by getting the value of the corresponding Item element....
|
|
|
|
Total Hits: 8 | Today: 1
|
Author: Hosam Ershedat
|
Rating:
|
|

This is a simple VB6 application that can change file or folder attributes and teach you how to accept dropped files, and files from command line. The purpose of this article is for beginners to know how to create WndProc function and translate the message WM_DROPFILES....
|
|
|
|
Total Hits: 9 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

Design-time support extensions are typically implemented in code that exists separately from the code for a component. A variety of attributes are used to associate design-time support providers with a type or an individual member of a type....
|
|
|
|
Total Hits: 7 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

The following code example demonstrates how to create a custom designer that adjusts a component's attributes, events, and properties. A designer class called DemoControlDesigner is attached to a DemoControl class and performs the following operations:
*
Adds a property to the DemoControl class. *
Removes a property from the DemoControl class. *
Shadows a property of the DemoControl class....
|
|
|
|
Total Hits: 102 | Today: 0
|
Author: dmm12
|
Rating:
|
|

Again, I know there are numerous examples of alpha blending stuff, but many are not true blends, such as one of my articles, others call managing transparencies as blends and others are truly complicated transforms and merges....
|
|
|
|
Total Hits: 53 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

Allows security actions for PrincipalPermission to be applied to code using declarative security. This class cannot be inherited. PrincipalPermissionAttribute can be used to declaratively demand that users running your code belong to a specified role or have been authenticated. Use of Unrestricted creates a PrincipalPermission with Authenticated set to true and Name and Role set to nullNothingnullptra null reference (Nothing in Visual Basic)....
|
|
|
|
Total Hits: 48 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

Indicates that an interface or a class defines a service contract in a Windows Communication Foundation (WCF) application....
|
|
|
|
Total Hits: 44 | Today: 0
|
Author: Microsoft Corporation
|
Rating:
|
|

Indicates that a method defines an operation that is part of a service contract in a Windows Communication Foundation (WCF) application. Apply the OperationContractAttribute to a method to indicate that the method implements a service operation as part of a service contract (specified by a ServiceContractAttribute attribute)....
|
|
|
|
Total Hits: 48 | Today: 0
|
Author: Microsoft Corporation
|
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....
|
|
|
|
Total Hits: 58 | Today: 0
|
Author: Ted Pattison
|
Rating:
|
|

One of the most powerful aspects of the Microsoft® .NET Framework is its support for attributes. Attribute-based programming is extremely powerful because it adds a declarative dimension to designing and writing software. Declarative programming provides an elegant new way for developers to leverage services and functionality from reusable libraries and frameworks as well as from developer tools, such as the Visual Basic® .NET compiler. As a user of Visual Basic .NET, it's essential that you und...
|
|
|
|
|
|