System.ComponentModel.LicenseProviderAttribute Class

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

See Also: LicenseProviderAttribute


[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class LicenseProviderAttribute : Attribute


When you create a component that you want to license, you must specify the LicenseProvider by marking the component with a LicenseProviderAttribute.

Use the LicenseProviderAttribute.LicenseProvider property to get the Type of the LicenseProvider.

For more information about attributes, see Extending Metadata Using Attributes. For more information about licensing, see How to: License Components and Controls.


The HostProtectionAttribute attribute applied to this class has the following HostProtectionAttribute.Resources property value: HostProtectionResource.SharedState. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,

The members of System.ComponentModel.LicenseProviderAttribute are listed below.

See Also: Attribute

Public Constructors

Initializes a new instance of the LicenseProviderAttribute class without a license provider.

Initializes a new instance of the LicenseProviderAttribute class with the specified type.

Initializes a new instance of the LicenseProviderAttribute class with the specified type of license provider.

Public Fields

static readonly

Specifies the default value, which is no provider. This static field is read-only.

Public Properties


Gets the license provider that must be used with the associated class.


Indicates a unique ID for this attribute type.

Public Methods

Equals(Object) : Boolean

Indicates whether this instance and a specified object are equal.

GetHashCode() : Int32

Returns the hash code for this instance.