Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions What are C attributes and its significance And tell me other attributes you know other than



C# attributes and its significance? And various attributes list

View(s): 17224

What are C# attributes and its significance? And tell me other attributes you know other than [WebMethod()] attribute?

Answer 1)

C# provides a mechanism for defining declarative tags, called attributes, which you can place on certain entities (class/method/field/event/etc...) in your source code to specify additional information. The information that attributes contain can be retrieved at run time through reflection.

In simple words, attributes provides additional information or gives the clues to CLR to perform certain operations.

Just think of following scenario:

.NET, writing a Web Service is same as writing general class. But have you any time think of

1)      How .NET generating WSDL on fly for your Web Service?

2)      How to tell the .NET to choose/expose only few methods in Web Service to outer world?

The answer is [WebMethod()] attribute. This attribute gives the clue to CLR that marked method is chosen to expose as webmethod to outer world. Now CLR knows which methods need to  expose and generates the WSDL.

Below are list available C# attributes:

Attributes

Description

[LoadInSeparateAppDomain()]

Defines the metadata attribute that MSBuild uses to identify tasks that must be executed in their own application domains.

[Output()]

Defines the metadata attribute that task authors use to identify task properties that output data from the task.

[Required()]

Defines the metadata attribute that task authors use to identify required task properties. Task properties with this attribute must have a set value when the task is run.

[SqlFacet()]

Annotates the returned result of a user-defined type (UDT) with additional information that can be used in Transact-SQL.

[SqlFunction()]

Used to mark a method definition of a user-defined aggregate as a function in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server.

[SqlProcedure()]

Used to mark a method definition in an assembly as a stored procedure. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server. This class cannot be inherited.

[SqlTrigger()]

Used to mark a method definition in an assembly as a trigger in SQL Server. The properties on the attribute reflect the physical attributes used when the type is registered with SQL Server. This class cannot be inherited.

[SqlUserDefinedAggregate()]

Indicates that the type should be registered as a user-defined aggregate. The properties on the attribute reflect the physical attributes used when the type is registered with SQL Server. This class cannot be inherited.

[SqlUserDefinedType()]

Used to mark a type definition in an assembly as a user-defined type (UDT) in SQL Server. The properties on the attribute reflect the physical characteristics used when the type is registered with SQL Server. This class cannot be inherited.

[ComClass()]

The ComClassAttribute attribute instructs the compiler to add metadata that allows a class to be exposed as a COM object.

[DesignerGenerated()]

When applied to a class, the compiler implicitly calls a component-initializing method from the default synthetic constructor.

[OptionCompare()]

Specifies that the current Option Compare setting should be passed as the default value for an argument.

[OptionText()]

The Visual Basic compiler emits this helper class to indicate (for Visual Basic debugging) which comparison option, binary or text, is being used

[StandardModule()]

This class provides attributes that are applied to the standard module construct when it is emitted to Intermediate Language (IL). It is not intended to be called directly from your code.

[HideModuleName()]

The HideModuleNameAttribute attribute, when applied to a module, allows the module members to be accessed using only the qualification needed for the module.

[MyGroupCollection()]

This attribute supports My.Forms and My.WebServices in Visual Basic.

[VBFixedArray()]

Indicates that an array in a structure or non-local variable should be treated as a fixed-length array.

[VBFixedString()]

Indicates that a string should be treated as if it were fixed length.

[DebugInfoInPDB()]

An attribute applied to native classes that tells the debugger to look up field information in the pdb rather than in metadata.

[DecoratedName()]

An attribute used by the compiler to pass the decorated name of a method to the linker.

[MiscellaneousBits()]

An attribute that stores miscellaneous information about a type in metadata.

[VsaModule()]

This type supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ModuleHomepage()]

 

[ModulePageIdentifier()]

 

[ModuleServiceMethod()]

 

[Usage()]

Specifies the usage of another attribute class. This class cannot be inherited.

[CLSCompliant()]

Indicates whether a program element is compliant with the Common Language Specification (CLS). This class cannot be inherited.

[GeneratedCode()]

Identifies code generated by a tool. This class cannot be inherited.

[AmbientValue()]

Specifies the value to pass to a property to cause the property to get its value from another source. This is known as ambience. This class cannot be inherited.

[Provider()]

Enables attribute redirection. This class cannot be inherited.

[Bindable()]

Specifies whether a member is typically used for binding. This class cannot be inherited.

[Browsable()]

Specifies whether a property or event should be displayed in a Properties window.

[Category()]

Specifies the name of the category in which to group the property or event when displayed in a PropertyGrid control set to Categorized mode.

[ComplexBindingProperties()]

Specifies the data source and data member properties for a component that supports complex data binding. This class cannot be inherited.

[DataObject()]

Identifies a type as an object suitable for binding to an ObjectDataSource object. This class cannot be inherited.

[DataObjectField()]

Provides metadata for a property representing a data field. This class cannot be inherited.

[DataObjectMethod()]

Identifies a data operation method exposed by a type, what type of operation the method performs, and whether the method is the default data method. This class cannot be inherited.

[DefaultBindingProperty()]

Specifies the default binding property for a component. This class cannot be inherited.

[DefaultEvent()]

Specifies the default event for a component.

[DefaultProperty()]

Specifies the default property for a component.

[DefaultValue()]

Specifies the default value for a property.

[Description()]

Specifies a description for a property or event.

[HelpKeyword()]

Specifies the context keyword for a class or member. This class cannot be inherited.

[DefaultSerializationProvider()]

The DefaultSerializationProviderAttribute attribute is placed on a serializer to indicate the class to use as a default provider of that type of serializer.

[DesignerSerializer()]

Indicates a serializer for the serialization manager to use to serialize the values of the type this attribute is applied to. This class cannot be inherited.

[RootDesignerSerializer()]

Indicates the base serializer to use for a root designer object. This class cannot be inherited.

[Designer()]

Specifies the class used to implement design-time services for a component.

[DesignerCategory()]

Specifies that the designer for a class belongs to a certain category.

[DesignerSerializationVisibility()]

Specifies the type of persistence to use when serializing a property on a component at design time.

[DesignOnly()]

Specifies whether a property can only be set at design time.

[DesignTimeVisible()]

DesignTimeVisibleAttribute marks a component's visibility. If Yes is present, a visual designer can show this component on a designer.

[DisplayName()]

Specifies the display name for a property, event, or public void method which takes no arguments.

[Editor()]

Specifies the editor to use to change a property. This class cannot be inherited.

[EditorBrowsable()]

Specifies that a property or method is viewable in an editor. This class cannot be inherited.

[ExtenderProvidedProperty()]

Specifies a property that is offered by an extender provider. This class cannot be inherited.

[ImmutableObject()]

Specifies that an object has no subproperties capable of being edited. This class cannot be inherited.

[Inheritance()]

Indicates whether the component associated with this attribute has been inherited from a base class. This class cannot be inherited.

[InitializationEvent()]

Specifies which event is raised on initialization. This class cannot be inherited.

[InstallerType()]

Specifies the installer for a type that installs components.

[LicenseProvider()]

Specifies the LicenseProvider to use with a class. This class cannot be inherited.

[ListBindable()]

Specifies that a list can be used as a data source. A visual designer should use this attribute to determine whether to display a particular list in a data-binding picker. This class cannot be inherited.

[Localizable()]

Specifies whether a property should be localized. This class cannot be inherited.

[LookupBindingProperties()]

Specifies the properties that support lookup-based binding. This class cannot be inherited.

[MergableProperty()]

Specifies that this property can be combined with properties belonging to other objects in a Properties window.

[NotifyParentProperty()]

Indicates that the parent property is notified when the value of the property that this attribute is applied to is modified. This class cannot be inherited.

[ParenthesizePropertyName()]

Indicates whether the name of the associated property is displayed with parentheses in the Properties window. This class cannot be inherited.

[PasswordPropertyText()]

Indicates that an object's text representation is obscured by characters such as asterisks. This class cannot be inherited.

[PropertyFilter()]

Specifies which properties should be reported by type descriptors, specifically the GetProperties method.

[PropertyTab()]

Identifies the property tab or tabs to display for the specified class or classes.

[ProvideProperty()]

Specifies the name of the property that an implementer of IExtenderProvider offers to other components. This class cannot be inherited

[ReadOnly()]

Specifies whether the property this attribute is bound to is read-only or read/write. This class cannot be inherited

[RecommendedAsConfigurable()]

Specifies that the property can be used as an application setting.

[RefreshProperties()]

Indicates that the property grid should refresh when the associated property value changes. This class cannot be inherited.

[RunInstaller()]

Specifies whether the Visual Studio Custom Action Installer or the Installer Tool (Installutil.exe) should be invoked when the assembly is installed.

[SettingsBindable()]

Specifies when a component property can be bound to an application setting.

[ToolboxItem()]

Represents an attribute of a toolbox item.

[ToolboxItemFilter()]

Specifies the filter string and filter type to use for a toolbox item.

[TypeConverter()]

Specifies what type to use as a converter for the object this attribute is bound to. This class cannot be inherited.

[TypeDescriptionProvider()]

Specifies the custom type description provider for a class. This class cannot be inherited.

[ConfigurationCollection()]

Declaratively instructs the .NET Framework to create an instance of a configuration element collection. This class cannot be inherited.

[ConfigurationProperty()]

Declaratively instructs the .NET Framework to instantiate a configuration property. This class cannot be inherited.

[ConfigurationValidator()]

Serves as the base class for the System.Configuration validator attribute types.

[DefaultSettingValue()]

Specifies the default value for an application settings property.

[NoSettingsVersionUpgrade()]

Specifies that a settings provider should disable any logic that gets invoked when an application upgrade is detected. This class cannot be inherited.

[Setting()]

Represents a custom settings attribute used to associate settings information with a settings property.

[SettingsDescription()]

Provides a string that describes an individual configuration property. This class cannot be inherited.

[SettingsGroupDescription()]

Provides a string that describes an application settings property group. This class cannot be inherited.

[SettingsGroupName()]

Specifies a name for application settings property group. This class cannot be inherited.

[SettingsManageability()]

Specifies special services for application settings properties. This class cannot be inherited.

[SettingsProvider()]

Specifies the settings provider used to provide storage for the current application settings class or property. This class cannot be inherited.

[SettingsSerializeAs()]

Specifies the serialization mechanism that the settings provider should use. This class cannot be inherited.

[SpecialSetting()]

Indicates that an application settings property has a special significance. This class cannot be inherited.

[ContextStatic()]

Indicates that the value of a static field is unique for a particular context.

[DbProviderSpecificTypeProperty()]

Identifies which provider-specific property in the strongly typed parameter classes is to be used when setting a provider-specific type.

[SuppressMessage()]

Suppresses reporting of a specific static analysis tool rule violation, allowing multiple suppressions on a single code artifact.

[Conditional()]

Indicates to compilers that a method call or attribute should be ignored unless a specified conditional compilation symbol is defined.

[Debuggable()]

Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.

[DebuggerBrowsable()]

Determines if and how a member is displayed in the debugger variable windows. This class cannot be inherited.

[DebuggerDisplay()]

Determines how a class or field is displayed in the debugger variable windows.

[DebuggerHidden()]

Specifies the DebuggerHiddenAttribute. This class cannot be inherited.

[DebuggerNonUserCode()]

Identifies a type or member that is not part of the user code for an application.

[DebuggerStepperBoundary()]

Indicates the code following the attribute is to be executed in run, not step, mode.

[DebuggerStepThrough()]

Specifies the DebuggerStepThroughAttribute. This class cannot be inherited.

[DebuggerTypeProxy()]

Specifies the display proxy for a type.

[DebuggerVisualizer()]

Specifies that the type has a visualizer. This class cannot be inherited.

[Switch()]

Identifies a switch used in an assembly, class, or member.

[SwitchLevel()]

Identifies the level type for a switch.

[ToolboxBitmap()]

Allows you to specify an icon to represent a control in a container, such as the Microsoft Visual Studio Form Designer.

[ApplicationAccessControl()]

Specifies access controls to an assembly containing ServicedComponent classes.

[ApplicationActivation()]

Specifies whether components in the assembly run in the creator's process or in a system process.

[ApplicationID()]

Specifies the application ID (as a GUID) for this assembly. This class cannot be inherited.

[ApplicationName()]

Specifies the name of the COM+ application to be used for the install of the components in the assembly. This class cannot be inherited.

[ApplicationQueuing()]

Enables queuing support for the marked assembly and enables the application to read method calls from Message Queuing queues. This class cannot be inherited.

[AutoComplete()]

Marks the attributed method as an AutoComplete object. This class cannot be inherited.

[ApplicationCrmEnabled()]

Enables Compensating Resource Manger (CRM) on the tagged application.

[ComponentAccessControl()]

Enables security checking on calls to a component. This class cannot be inherited.

[COMTIIntrinsics()]

Enables you to pass context properties from the COM Transaction Integrator (COMTI) into the COM+ context.

[ConstructionEnabled()]

Enables COM+ object construction support. This class cannot be inherited.

[Description()]

Sets the description on an assembly (application), component, method, or interface. This class cannot be inherited.

[EventClass()]

Marks the attributed class as an event class. This class cannot be inherited.

[EventTrackingEnabled()]

Enables event tracking for a component. This class cannot be inherited.

[ExceptionClass()]

Sets the queuing exception class for the queued class. This class cannot be inherited.

[IISIntrinsics()]

Enables access to ASP intrinsic values from ContextUtil.GetNamedProperty. This class cannot be inherited.

[InterfaceQueuing()]

Enables queuing support for the marked interface. This class cannot be inherited.

[JustInTimeActivation()]

Turns just-in-time (JIT) activation on or off. This class cannot be inherited.

[LoadBalancingSupported()]

Determines whether the component participates in load balancing, if the component load balancing service is installed and enabled on the server.

[MustRunInClientContext()]

Forces the attributed object to be created in the context of the creator, if possible. This class cannot be inherited.

[ObjectPooling()]

Enables and configures object pooling for a component. This class cannot be inherited.

[PrivateComponent()]

Identifies a component as a private component that is only seen and activated by components in the same application. This class cannot be inherited.

[SecureMethod()]

Ensures that the infrastructure calls through an interface for a method or for each method in a class when using the security service. Classes need to use interfaces to use security services. This class cannot be inherited.

[SecurityRole()]

Configures a role for an application or component. This class cannot be inherited.

[Synchronization()]

Sets the synchronization value of the component. This class cannot be inherited.

[Transaction()]

Specifies the type of transaction that is available to the attributed object. Permissible values are members of the TransactionOption enumeration.

[Flags()]

Indicates that an enumeration can be treated as a bit field; that is, a set of flags.

[LoaderOptimization()]

Used to set the default loader optimization policy for the main method of an executable application.

[IgnoreMember()]

Causes the associated member of an instrumented class to be ignored by management instrumentation.

[InstrumentationClass()]

Specifies that a class provides event or instance instrumentation.

[Instrumented()]

Specifies that this assembly provides management instrumentation. This attribute should appear one time per assembly.

[ManagedName()]

Allows an instrumented class, or member of an instrumented class, to present an alternate name through management instrumentation.

[MTAThread()]

Indicates that the COM threading model for an application is multithreaded apartment (MTA).

[NonSerialized()]

Indicates that a field of a serializable class should not be serialized. This class cannot be inherited.

[Obsolete()]

Marks the program elements that are no longer in use. This class cannot be inherited.

[ParamArray()]

Indicates that the method will allow a variable number of arguments in its invocation. This class cannot be inherited.

[AssemblyAlgorithmId()]

Specifies an algorithm to hash all files in an assembly. This class cannot be inherited.

[AssemblyCompany()]

Defines a company name custom attribute for an assembly manifest.

[AssemblyConfiguration()]

Specifies the build configuration, such as retail or debug, for an assembly.

[AssemblyCopyright()]

Defines a copyright custom attribute for an assembly manifest.

[AssemblyCulture()]

Specifies which culture the assembly supports.

[AssemblyDefaultAlias()]

Defines a friendly default alias for an assembly manifest.

[AssemblyDelaySign()]

Specifies that the assembly is not fully signed when created.

[AssemblyDescription()]

Provides a text description for an assembly.

[AssemblyFileVersion()]

Instructs a compiler to use a specific version number for the Win32 file version resource. The Win32 file version is not required to be the same as the assembly's version number.

[AssemblyFlags()]

Specifies a bitwise combination of AssemblyNameFlags flags for an assembly, describing just-in-time (JIT) compiler options, whether the assembly is retargetable, and whether it has a full or tokenized public key. This class cannot be inherited.

[AssemblyInformationalVersion()]

Defines additional version information for an assembly manifest.

[AssemblyKeyFile()]

Specifies the name of a file containing the key pair used to generate a strong name.

[AssemblyKeyName()]

Specifies the name of a key container within the CSP containing the key pair used to generate a strong name.

[AssemblyProduct()]

Defines a product name custom attribute for an assembly manifest.

[AssemblyTitle()]

Defines an assembly title custom attribute for an assembly manifest.

[AssemblyTrademark()]

Defines a trademark custom attribute for an assembly manifest.

[AssemblyVersion()]

Specifies the version of the assembly being attributed.

[DefaultMember()]

Defines the member of a type that is the default member used by InvokeMember.

[ObfuscateAssembly()]

Instructs obfuscation tools to use their standard obfuscation rules for the appropriate assembly type.

[Obfuscation()]

Instructs obfuscation tools to take the specified actions for an assembly, type, or member.

[NeutralResourcesLanguage()]

Informs the ResourceManager of the neutral culture of an assembly. This class cannot be inherited.

[SatelliteContractVersion()]

Instructs the ResourceManager to ask for a particular version of a satellite assembly to simplify updates of the main assembly of an application.

[AccessedThroughProperty()]

Specifies the name of the property that accesses the attributed field.

[CompilationRelaxations()]

Controls the strictness of the code generated by the common language runtime's just-in-time (JIT) compiler.

[CompilerGenerated()]

Distinguishes a compiler-generated element from a user-generated element. This class cannot be inherited.

[CompilerGlobalScope()]

Indicates that a class should be treated as if it has global scope.

[CustomConstant()]

Defines a constant value that a compiler can persist for a field or method parameter.

[DecimalConstant()]

Stores the value of a System.Decimal constant in metadata. This class cannot be inherited.

[DefaultDependency()]

Provides a hint to the common language runtime (CLR) indicating how likely a dependency is to be loaded. This class is used in a dependent assembly to indicate what hint should be used when the parent does not specify the DependencyAttribute attribute. This class cannot be inherited.

[Dependency()]

Indicates when a dependency is to be loaded by the referring assembly. This class cannot be inherited.

[Discardable()]

Marks a type definition as discardable.

[FixedAddressValueType()]

Fixes the address of a static value type field throughout its lifetime. This class cannot be inherited.

[FixedBuffer()]

Indicates that a field should be treated as containing a fixed number of elements of the specified primitive type. This class cannot be inherited.

[HasCopySemantics()]

This class is not used in the .NET Framework version 2.0 and is reserved for future use. This class cannot be inherited.

[IndexerName()]

Indicates the name by which an indexer is known in programming languages that do not support indexers directly.

[InternalsVisibleTo()]

Specifies that types that are ordinarily visible only within the current assembly are visible to another assembly.

[MethodImpl()]

Specifies the details of how a method is implemented. This class cannot be inherited.

[NativeCppClass()]

Applies metadata to an assembly that indicates that a type is an unmanaged type. This class cannot be inherited.

[Required()]

Specifies that an importing compiler must fully understand the semantics of a type definition, or refuse to use it. This class cannot be inherited.

[RuntimeCompatibility()]

Specifies whether to wrap exceptions that do not derive from the Exception class with a RuntimeWrappedException object. This class cannot be inherited.

[ScopelessEnum()]

Indicates that a native enumeration is not qualified by the enumeration type name. This class cannot be inherited.

[SpecialName()]

Indicates that a type or member is treated in a special way by the runtime or tools. This class cannot be inherited.

[StringFreezing()]

Freezes a string literal when creating native images using the Native Image Generator (Ngen.exe). This class cannot be inherited.

[SuppressIldasm()]

Prevents the MSIL Disassembler (Ildasm.exe) from disassembling an assembly. This class cannot be inherited.

[TypeForwardedTo()]

Specifies a destination Type in another assembly. This class cannot be inherited.

[UnsafeValueType()]

Specifies that a type contains an unmanaged array that might potentially overflow. This class cannot be inherited.

[PrePrepareMethod()]

Instructs the native image generation service to prepare a method for inclusion in a constrained execution region (CER).

[ReliabilityContract()]

Defines a contract for reliability between the author of some code, and the developers who have a dependency on that code.

[AutomationProxy()]

Specifies whether the type should be marshaled using the Automation marshaler or a custom proxy and stub.

[BestFitMapping()]

Controls whether Unicode characters are converted to the closest matching ANSI characters.

[ClassInterface()]

Indicates the type of class interface to be generated for a class exposed to COM, if an interface is generated at all.

[CoClass()]

Specifies the class identifier of a coclass imported from a type library.

[ComAliasName()]

Indicates the COM alias for a parameter or field type.

[ComCompatibleVersion()]

Indicates to a COM client that all classes in the current version of an assembly are compatible with classes in an earlier version of the assembly.

[ComConversionLoss()]

Indicates that information was lost about a class or interface when it was imported from a type library to an assembly.

[ComDefaultInterface()]

Specifies a default interface to expose to COM. This class cannot be inherited.

[ComEventInterface()]

Identifies the source interface and the class that implements the methods of the event interface that is generated when a coclass is imported from a COM type library.

[ComImport()]

Indicates that the attributed type was previously defined in COM.

[ComRegisterFunction()]

Specifies the method to call when you register an assembly for use from COM; this allows for the execution of user-written code during the registration process.

[ComSourceInterfaces()]

Identifies a list of interfaces that are exposed as COM event sources for the attributed class.

[ComUnregisterFunction()]

Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process.

[ComVisible()]

Controls accessibility of an individual managed type or member, or of all types within an assembly, to COM.

[DefaultCharSet()]

Specifies the value of the CharSet enumeration. This class cannot be inherited.

[DefaultParameterValue()]

Sets the default value of a parameter when called from a language that supports default parameters. This class cannot be inherited.

[DispId()]

Specifies the COM dispatch identifier (DISPID) of a method, field, or property.

[DllImport()]

Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point.

[FieldOffset()]

Indicates the physical position of fields within the managed and unmanaged representation of a class or structure.

[Guid()]

Supplies an explicit System.Guid when an automatic GUID is undesirable.

[IDispatchImpl()]

Indicates which IDispatch implementation the common language runtime uses when exposing dual interfaces and dispinterfaces to COM.

[ImportedFromTypeLib()]

Indicates that the types defined within an assembly were originally defined in a type library.

[In()]

Indicates that data should be marshaled from the caller to the callee, but not back to the caller.

[InterfaceType()]

Indicates whether a managed interface is dual, dispatch-only, or IUnknown -only when exposed to COM.

[LCIDConversion()]

Indicates that a method's unmanaged signature expects a locale identifier (LCID) parameter.

[MarshalAs()]

Indicates how to marshal the data between managed and unmanaged code.

[Optional()]

Indicates that a parameter is optional.

[Out()]

Indicates that data should be marshaled from callee back to caller.

[PreserveSig()]

Indicates that the HRESULT or retval signature transformation that takes place during COM interop calls should be suppressed.

[PrimaryInteropAssembly()]

Indicates that the attributed assembly is a primary interop assembly.

[ProgId()]

Allows the user to specify the ProgID of a class.

[SetWin32ContextInIDispatch()]

This attribute has been deprecated.

[StructLayout()]

The StructLayoutAttribute class allows the user to control the physical layout of the data fields of a class or structure.

[TypeLibFunc()]

Contains the FUNCFLAGS that were originally imported for this method from the COM type library.

[TypeLibImportClass()]

Specifies which Type exclusively uses an interface. This class cannot be inherited.

[TypeLibType()]

Contains the TYPEFLAGS that were originally imported for this type from the COM type library.

[TypeLibVar()]

Contains the VARFLAGS that were originally imported for this field from the COM type library.

[TypeLibVersion()]

Specifies the version number of an exported type library.

[UnmanagedFunctionPointer()]

Controls the marshaling behavior of a delegate signature passed as an unmanaged function pointer to or from unmanaged code. This class cannot be inherited.

[Context()]

Provides the default implementations of the IContextAttribute and IContextProperty interfaces.

[OneWay()]

Marks a method as one way, without a return value and out or ref parameters.

[Soap()]

Provides default functionality for all SOAP attributes.

[Proxy()]

Indicates that an object type requires a custom proxy.

[CollectionDataContract()]

 

[ContractNamespace()]

Specifies the CLR namespace and XML namespace of the data contract.

[DataContract()]

 

[DataMember()]

When applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer.

[EnumMember()]

 

[KnownType()]

 

[OnDeserialized()]

When applied to a method, specifies that the method is called immediately after deserialization of the object.

[OnDeserializing()]

When applied to a method, specifies that the method is called during deserialization of an object.

[OnSerialized()]

When applied to a method, specifies that the method is called after serialization of an object graph.

[OnSerializing()]

When applied to a method, specifies that the method is called before serialization of an object.

[OptionalField()]

Specifies that a field can be missing from a serialization stream so that the BinaryFormatter and the SoapFormatter does not throw an exception.

[ResourceConsumption()]

Specifies the resource consumed by the member of a class. This class cannot be inherited.

[ResourceExposure()]

Specifies the resource exposure for a member of a class. This class cannot be inherited.

[AllowPartiallyTrustedCallers()]

Allows strong-named assemblies to be called by partially trusted code. Without this declaration, only fully trusted callers are able to use such assemblies. This class cannot be inherited.

[Security()]

Specifies the base attribute class for declarative security from which CodeAccessSecurityAttribute is derived.

[SecurityCritical()]

Specifies that code or an assembly performs security-critical operations.

[SecurityTransparent()]

Specifies that an assembly cannot cause an elevation of privilege.

[SecurityTreatAsSafe()]

Identifies which of the nonpublic SecurityCriticalAttribute members are accessible by transparent code within the assembly.

[SuppressUnmanagedCodeSecurity()]

Allows managed code to call into unmanaged code without a stack walk. This class cannot be inherited.

[UnverifiableCode()]

Marks modules containing unverifiable code. This class cannot be inherited.

[Serializable()]

Indicates that a class can be serialized. This class cannot be inherited.

[AspNetCompatibilityRequirements()]

 

[CallbackBehavior()]

Configures a callback service implementation in a client application.

[DataContractFormat()]

Instructs the Windows Communication Foundation (WCF) infrastructure to use the DataContractSerializer.

[DeliveryRequirements()]

Specifies the feature requirements that bindings must provide to the service or client implementation.

[FaultContract()]

Specifies one or more SOAP faults that are returned when a service operation encounters processing errors.

[MessageContract()]

 

[MessageContractMember()]

Declares the base members for MessageBodyMemberAttribute and MessageHeaderAttribute.

[MessageParameter()]

Controls the name of the request and response parameter names. Cannot be used with Message or message contracts.

[MessageProperty()]

Represents data that is passed locally with a custom message type but not serialized into a SOAP message.

[OperationBehavior()]

 

[OperationContract()]

Indicates that a method defines an operation that is part of a service contract in a Windows Communication Foundation (WCF) application.

[ServiceBehavior()]

 

[ServiceContract()]

 

[ServiceKnownType()]

Specifies known types to be used by a service when serializing or deserializing.

[TransactionFlow()]

Specifies the willingness of a service operation to accept incoming transactions from a client.

[XmlSerializerFormat()]

Instructs the Windows Communication Foundation (WCF) infrastructure to use the XmlSerializer instead of the XmlObjectSerializer.

[STAThread()]

Indicates that the COM threading model for an application is single-threaded apartment (STA).

[ThreadStatic()]

Indicates that the value of a static field is unique for each thread.

[BuildProviderAppliesTo()]

Defines an attribute that specifies the scope where a build provider will be applied when a resource is located. This class cannot be inherited.

[DesignTimeResourceProviderFactory()]

Specifies the type of resource provider factory for design time. This class cannot be inherited.

[ExpressionEditor()]

Specifies the design-time editor of the expression builder. This class cannot be inherited.

[ExpressionPrefix()]

Specifies the prefix attribute to use for the expression builder. This class cannot be inherited.

[CustomProviderData()]

 

[ProfileProvider()]

 

[SettingsAllowAnonymous()]

Identifies whether a profile property can be set or accessed for an anonymous user.

[XmlFormatExtension()]

Specifies that a service description format extension runs at one or more extension points. This class cannot be inherited.

[XmlFormatExtensionPoint()]

Specifies the XML namespace and XML namespace prefix to use for a service description format extension within a service description. This class cannot be inherited.

[XmlFormatExtensionPrefix()]

Specifies the XML namespace and XML namespace prefix to use for a service description format extension within a service description. This class cannot be inherited.

[HttpMethod()]

Applying this attribute to an XML Web service client using HTTP-GET or HTTP-POST, sets the types that serialize the parameters sent to an XML Web service method and read the response from the XML Web service method. This class cannot be inherited.

[Match()]

Represents the attributes of a match made using text pattern matching. This class cannot be inherited.

[SoapDocumentMethod()]

Applying the SoapDocumentMethodAttribute to a method specifies that SOAP messages to and from the method use Document formatting.

[SoapDocumentService()]

Applying the optional SoapDocumentServiceAttribute to an XML Web service sets the default format of SOAP requests and responses sent to and from XML Web service methods within the XML Web service.

[SoapExtension()]

When overridden in a derived class, specifies a SOAP extension should run with an XML Web service method.

[SoapHeader()]

This attribute is applied to an XML Web service method or an XML Web service client to specify a SOAP header that the XML Web service method or XML Web service client can process. This class cannot be inherited.

[SoapRpcMethod()]

Specifies that SOAP messages sent to and from the method use RPC formatting.

[SoapRpcService()]

Sets the default format of SOAP requests and responses sent to and from XML Web service methods within the XML Web service.

[WebMethod()]

Adding this attribute to a method within an XML Web service created using ASP.NET makes the method callable from remote Web clients. This class cannot be inherited.

[WebService()]

Used to add additional information to an XML Web service, such as a string describing its functionality.

[WebServiceBinding()]

Declares a binding that defines one or more XML Web service methods. This class cannot be inherited.

[ConstructorNeedsTag()]

 

[ControlBuilder()]

Specifies a ControlBuilder class for building a custom control within the ASP.NET parser. This class cannot be inherited.

[ControlValueProperty()]

Specifies the default property of a control that a ControlParameter object binds to at run time. This class cannot be inherited.

[DataBindingHandler()]

Specifies a design-time class that performs data binding of controls within a designer. This class cannot be inherited.

[SupportsPreviewControl()]

Indicates whether a control designer requires a preview instance of the control at design time. This class cannot be inherited.

[FileLevelControlBuilder()]

 

[Filterable()]

Specifies whether the property to which the attribute is applied supports device filtering. This class cannot be inherited.

[IDReferenceProperty()]

Defines an attribute applied to properties that contain ID references. This class cannot be inherited.

[DesignerAdapter()]

Provides a reference to the type of adapter to be used in the designer.

[DeviceOverridable()]

Represents an attribute that indicates whether the rendering of a mobile control can be overridden by the device.

[ObjectListTitle()]

Provides the title of an object list in an object list field.

[PersistName()]

This attribute supports the .NET Framework infrastructure and should not be used directly by your code.

[NonVisualControl()]

Defines the attribute that indicates whether a control is treated as a visual or non-visual control during design time. This class cannot be inherited.

[ParseChildren()]

Defines a metadata attribute that you can use when developing ASP.NET server controls. Use the ParseChildrenAttribute class to indicate how the page parser should treat content nested inside a server control tag declared on a page. This class cannot be inherited.

[PartialCaching()]

 

[PersistChildren()]

 

[PersistenceMode()]

Defines the metadata attribute that specifies how an ASP.NET server control property or event is persisted to an ASP.NET page at design time. This class cannot be inherited.

[SupportsEventValidation()]

Defines the metadata attribute that Web server controls use to indicate support for event validation. This class cannot be inherited.

[TagPrefix()]

 

[TemplateContainer()]

 

[TemplateInstance()]

Defines a metadata attribute that is used to specify the number of allowed instances of a template. This class cannot be inherited.

[Themeable()]

Defines the metadata attribute that Web server controls and their members use to indicate whether their rendering can be affected by themes and control skins. This class cannot be inherited.

[ToolboxData()]

 

[UrlProperty()]

Defines the attribute that controls use to identify string properties containing URL values. This class cannot be inherited.

[ValidationProperty()]

 

[Verification()]

Defines the metadata attribute of a Web content accessibility rule. This class cannot be inherited.

[ViewStateModeById()]

Defines the metadata attribute that ASP.NET server controls use to specify whether they participate in loading view-state information by ID. This class cannot be inherited.

[ConnectionConsumer()]

Identifies the callback method in a server control acting as the consumer in a Web Parts connection, and enables developers to specify details about the consumer's connection point.

[ConnectionProvider()]

 

[Personalizable()]

Represents the personalization attribute. This class cannot be inherited.

[WebBrowsable()]

 

[WebDescription()]

 

[WebDisplayName()]

 

[WebPartTransformer()]

 

[WebResource()]

Defines the metadata attribute that enables an embedded resource in an assembly. This class cannot be inherited.

[AttachedPropertyBrowsable()]

Provides a base class for .NET Framework attributes that report the use scope of attached properties.

[ValueConversion()]

Represents an attribute that allows the author of a value converter to specify the data types involved in the implementation of the converter. This class cannot be inherited.

[Clsid()]

Specifies the CLSID of an ActiveX control hosted by an AxHost control.

[TypeLibraryTimeStamp()]

Specifies a date and time associated with the type library of an ActiveX control hosted by an AxHost control.

[DataGridViewColumnDesignTimeVisible()]

Specifies whether a column type is visible in the DataGridView designer. This class cannot be inherited.

[ToolStripItemDesignerAvailability()]

Specifies which types a ToolStripItem can appear in. This class cannot be inherited.

[Docking()]

Specifies the default docking behavior for a control.

[RelatedImageList()]

Indicates which ImageList a property is related to.

[Localizability()]

Specifies the localization attributes for a binary XAML (BAML) class or class member.

[ConstructorArgument()]

Specifies that the associated property can be initialized by using constructor parameter of the specified name. This class cannot be inherited.

[ContentProperty()]

Specifies which property of a class to use as the content property when written as XAML. This class cannot be inherited.

[ContentWrapper()]

Specifies a type on the associated collection type that will be used to wrap foreign content. This class cannot be inherited.

[DependsOn()]

Specifies that the associated property is dependent on the value of another property. This class cannot be inherited.

[DesignerSerializationOptions()]

Specifies the serialization flags for a property.

[MarkupExtensionReturnType()]

Specifies the type that a markup extension can return. This class cannot be inherited.

[RootNamespace()]

RootNamespaceAttribute is an assembly level attribute that is used to identify the value of the RootNamespace property in a project file.

[RuntimeNameProperty()]

Specifies the property of a class that maps to the XAML x:Name Attribute. This class cannot be inherited.

[TrimSurroundingWhitespace()]

Specifies that the whitespace surrounding an element should be trimmed. This class cannot be inherited.

[ValueSerializer()]

Specifies which ValueSerializer class to use for a particular type or overrides which ValueSerializer to use for a property. This class cannot be inherited.

[WhitespaceSignificantCollection()]

Specifies that a collection considers whitespace to be significant. This class cannot be inhertied.

[XmlLangProperty()]

Specifies the property to associate with the xml:lang Attribute.

[XmlnsCompatibleWith()]

Specifies that the namespace in a previously defined XmlnsDefinitionAttribute is overridden by a new namespace.

[XmlnsDefinition()]

Specifies a mapping in an assembly between an XML namespace and a CLR namespace. This class cannot be inherited.

[XmlnsPrefix()]

Specifies a recommend prefix to associate with an XML namespace when writing elements and attributes in a XAML file. This class cannot be inherited.

[DisableDpiAwareness()]

Allows WPF applications to disable dots per inch (dpi) awareness for all user interface elements.

[AssemblyAssociatedContentFile()]

This attribute is interpreted during the Extensible Application Markup Language (XAML) compilation process to associate loose content with a Windows Presentation Foundation (WPF) application.

[StyleTypedProperty()]

Represents an attribute that is applied to the class definition and determines the TargetTypes of the properties that are of type Style. This class cannot be inherited.

[TemplatePart()]

Represents an attribute that is applied to the class definition to identify the types of the named parts that are used for templating. This class cannot be inherited.

[ThemeInfo()]

Specifies the location in which theme dictionaries are stored for types in an assembly. This class cannot be inherited.

[CorrelationAlias()]

Overrides the correlation parameter value when the correlation value must be obtained from a parameter other than that indicated by the CorrelationParameterAttribute. This class cannot be inherited.

[CorrelationInitializer()]

 

[CorrelationParameter()]

 

[ExternalDataExchange()]

Marks an interface as a local service interface. This class cannot be inherited.

[Rule()]

Represents the base class for custom Rule attributes.

[AlternateFlowActivity()]

 

[ActivityCodeGenerator()]

 

[ActivityValidator()]

Identifies the class that performs validation on an Activity that is subject to validation. This class cannot be inherited.

[Info()]

 

[ValidationOption()]

Custom attribute that contains ValidationOption information. This class cannot be inherited.

[WorkflowMarkupSource()]

Attribute that contains information about a Workflow markup file. This class cannot be inherited.

[ActivityDesignerTheme()]

 

[TypeFilterProvider()]

Specifies the class a type or member uses to filter the types that are displayed in the class browser dialog box. This class cannot be inherited.

[PersistOnClose()]

Indicates that the current workflow instance must be persisted when the adorned activity completes its execution. This class cannot be inherited.

[ConstructorArgument()]

 

[ContentProperty()]

Contains the name for the content property of the decorated class. Marking a type with this attribute causes the data in that type to be serialized without the enclosing property name tags. This class cannot be inherited.

[RuntimeNameProperty()]

 

[XmlnsDefinition()]

 

[XmlnsPrefix()]

Contains XML namespace and prefix information for the decorated class. This class cannot be inherited.

[WorkflowDebuggerStepping()]

Specifies the debug stepping behavior for composite activities whose child activities can execute concurrently.

[Soap()]

Specifies that the XmlSerializer must serialize the class member as an encoded SOAP attribute.

[SoapElement()]

Specifies that the public member value be serialized by the XmlSerializer as an encoded SOAP XML element.

[SoapEnum()]

Controls how the XmlSerializer serializes an enumeration member.

[SoapIgnore()]

Instructs the XmlSerializer not to serialize the public field or public read/write property value.

[SoapInclude()]

Allows the XmlSerializer to recognize a type when it serializes or deserializes an object as encoded SOAP XML.

[SoapType()]

Controls the schema generated by the XmlSerializer when a class instance is serialized as SOAP encoded XML.

[XmlAny()]

Specifies that the member (a field that returns an array of XmlAttribute objects) can contain any XML attributes.

[XmlAnyElement()]

Specifies that the member (a field that returns an array of XmlElement or XmlNode objects) contains objects that represent any XML element that has no corresponding member in the object being serialized or deserialized.

[XmlArray()]

Specifies that the XmlSerializer must serialize a particular class member as an array of XML elements.

[XmlArrayItem()]

Specifies the derived types that the XmlSerializer can place in a serialized array.

[Xml()]

Specifies that the XmlSerializer must serialize the class member as an XML attribute.

[XmlChoiceIdentifier()]

Specifies that the member can be further detected by using an enumeration.

[XmlElement()]

Indicates that a public field or property represents an XML element when the XmlSerializer serializes or deserializes the object that contains it.

[XmlEnum()]

Controls how the XmlSerializer serializes an enumeration member.

[XmlIgnore()]

Instructs the Serialize method of the XmlSerializer not to serialize the public field or public read/write property value.

[XmlInclude()]

Allows the XmlSerializer to recognize a type when it serializes or deserializes an object.

[XmlNamespaceDeclarations()]

Specifies that the target property, parameter, return value, or class member contains prefixes associated with namespaces that are used within an XML document.

[XmlRoot()]

Controls XML serialization of the attribute target as an XML root element.

[XmlSchemaProvider()]

When applied to a type, stores the name of a static method of the type that returns an XML schema and a XmlQualifiedName (or XmlSchemaType for anonymous types) that controls the serialization of the type.

[XmlSerializerAssembly()]

Applied to a Web service client proxy, enables you to specify an assembly that contains custom-made serializers.

[XmlSerializerVersion()]

Signifies that the code was generated by the serialization infrastructure and can be reused for increased performance, when this attribute is applied to an assembly.

[XmlText()]

Indicates to the XmlSerializer that the member must be treated as XML text when the class that contains it is serialized or deserialized.

[XmlType()]

Controls the XML schema that is generated when the attribute target is serialized by the XmlSerializer.

  Asked in:  SemanticSpace Technologies, ValueLabs   Expertise Level:  Experienced
  Last updated on Thursday, 27 February 2014
4/5 stars (5 vote(s))

Register Login Ask Us Write to Us Help