This documentation is archived and is not being maintained.

LicenseManager.IsValid Method (Type, Object, License%)

Determines whether a valid license can be granted for the specified instance of the type. This method creates a valid License.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

public static bool IsValid(
	Type type,
	Object instance,
	out License license


Type: System.Type
A Type that represents the type of object that requests the license.
Type: System.Object
An object of the specified type or a type derived from the specified type.
Type: System.ComponentModel.License%
A License that is a valid license, or null if a valid license cannot be granted.

Return Value

Type: System.Boolean
true if a valid License can be granted; otherwise, false.

The IsValid method returns true when the type parameter is not licensed, or when it is licensed and the license parameter is valid.

This method does not throw a LicenseException when it cannot grant a valid License. The Validate method throws exceptions.

If the license parameter is not null after this call, the object asking for a License must dispose of the license by calling the Dispose method when the object is disposed of or finalized.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.