Getting an error from license provider
Hey,
I trying to build my custom control project and am getting the following error:
Error 1 'CS.MyLicenseProvider.GetLicense(System.ComponentM odel.LicenseContext, System.Type, object, bool)': not all code paths return a value
Here is my code:
<code>
using System;
using System.Collections.Generic;
using System.Text;
namespace CS
{
classMyLicenseProvider : System.ComponentModel.LicenseProvider
{
publicoverride System.ComponentModel.License GetLicense (System.ComponentModel.LicenseContext context, Type type, object instance, bool allowExceptions)
{
MyControlLicense lic = newMyControlLicense();
if (lic.LicenseKey == "OK")
{
return lic;
}
else
{
if (allowExceptions)
{
thrownew System.ComponentModel.LicenseException(type);
}
}
}
}
}
</code>
Any help will be greatly appreciated.
Tom
__________________
Thomas G Magaro
|