When using Web Service in. net, I first defined a common enumeration variable in a common DLL package.
Snet. Common. identifier. memberrole
{
Networkowner = 3,
/// <Remarks/>
Networkmember = 4,
/// <Remarks/>
Networkadmin = 5
}
After referencing this DLL in member web service, I publish it to IIS, and then reference this web service in the Web site.
This definition is also found in the Web servicer instance, which can be seen in its reference. CS
Public Enum memberrole {
Networkowner,
/// <Remarks/>
Networkmember,
/// <Remarks/>
Networkadmin
}
Memberrole is called on the page. networkmember it references the definition of the web service instance. The value is 0, but it is nothing more than a class, unless I write the full path snet. common. identifier. memberrole. memberrole, then fainted and asked some colleagues.
The Web Service reference automatically adds the available definition to its reference. CS file, but its value has changed, because their context is different, then what should we do? There is a way to call the interface definition, do not pass in the enumeration value, pass an enumeration variable, or directly use the const variable.