logo search
CSharp_Prog_Guide

Общие сведения о сборках

Сборки имеют следующие свойства.

Attributes

Attributes provide a powerful method of associating declarative information with C# code (types, methods, properties, and so forth). After an attribute is associated with a program entity, the attribute can be queried at run time by using a technique called reflection.

Attributes occur in two forms:

In this example, the TypeAttributes..::.Serializable attribute is used to apply a specific characteristic to a class:

[System.Serializable]

public class SampleClass

{

// Objects of this type can be serialized.

}

Attribute Overview

Attributes have the following properties: