mCore™ .NET SMS Library 1.2

License.IsLicensed Property

Description:

The IsLicensed property when read, checks the values set for Company, Key and LicenseType properties and returns a Boolean result whether the license information is valid or not.

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)

Exceptions:

mCore.GeneralException

Usage Example:

Visual Basic
Public Class MyClass
   Public WithEvents objSMS As New mCore.SMS
   Public Sub CheckLicense()
      objLic As mCore.License = objSMS.License
      Try
         objLic.Company = "My Company"
         objLic.LicenseType = "PRO-DEVELOPER"
         objLic.Key = "MY-LICENSE-KEY"
         MsgBox(objLic.IsLicensed)
      Catch ex As mCore.GeneralException
         MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo")
      Catch ex As Exception
      End Try
   End Sub
End Class
 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();
   public static void CheckLicense()
   {
      mCore.License objLic = objSMS.License();
      try
      {

         objLic.Company = "My Company";
         objLic.LicenseType = "PRO-DEVELOPER";
         objLic.Key = "MY-LICENSE-KEY";
         MessageBox.Show(objLic.IsLicensed());
      }

      catch (mCore.GeneralException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (Exception e)
      {
      }
   }
}

See Also:

mCore.SMS.License Method
License.Company Property
License.LicenseType Property
License.Key Property

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved