IsKeyValid Method
Collapse the table of content
Expand the table of content

LicFileLicenseProvider.IsKeyValid Method

Determines whether the key that the GetLicense method retrieves is valid for the specified type.

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

protected virtual bool IsKeyValid (
	string key,
	Type type
protected boolean IsKeyValid (
	String key, 
	Type type
protected function IsKeyValid (
	key : String, 
	type : Type
) : boolean
Not applicable.



The LicenseKey to check.


A Type that represents the component requesting the License.

Return Value

true if the key is a valid LicenseKey for the specified type; otherwise, false.

This method checks the key against the phrase: " myClassName is a licensed component. ", where myClassName is the FullName of the component you want to create.

Notes to Inheritors: When you inherit from this class, you can override this method to provide your own validation logic.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

© 2016 Microsoft