ArcGIS Runtime SDK for WPF - Library Reference
SetLicense Method
See Also  Example
ESRI.ArcGIS.Client Namespace > ArcGISRuntime Class : SetLicense Method

license
The string containing the main runtime deployment license.
extensions
Optional extension license strings for the runtime.
Sets the runtime license. The license must be set before the call to ArcGISRuntime Initialize is made.

Syntax

Visual Basic (Declaration) 
Public Shared Sub SetLicense( _
   ByVal license As String, _
   ByVal ParamArray extensions() As String _
) 
C# 
public static void SetLicense( 
   string license,
   params string[] extensions
)

Remarks

As a developer, when you license the ArcGIS Runtime SDK for WPF, you license your machine for all available product levels and extensions. If you do not set the license explicitly, the runtime will look for a developer license during initialization. It is therefore not necessary to set the license during initial development but a license must be set when testing and deploying applications.

The license string syntax can be obtained from the License Viewer tool included with the SDK and accessed from the Start Menu under Start > Programs > ArcGIS > Runtime SDK <version> for WPF > Runtime Tools > License Viewer. The License Viewer tool enables you to construct the correct license string based on license type (test or deployment), language (C# or VB.NET), product level (Basic or Standard) and extensions.

Parameters

license
The string containing the main runtime deployment license.
extensions
Optional extension license strings for the runtime.

Example

SetLicense example
C#Copy Code
// Set the ArcGIS Runtime license by providing the license string.
ArcGISRuntime.SetLicense("Place the License String in here");         
// Initialize the ArcGIS Runtime after the license has been set.
ArcGISRuntime.Initialize();
SetLicense example
VB.NETCopy Code
'Set the ArcGIS Runtime license by providing the license string.
ArcGISRuntime.SetLicense("Place the License String in here")
'Initialize the ArcGIS Runtime after the license has been set.
ArcGISRuntime.Initialize()

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.