KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got errors when I build my project: Warning as Error: Type of 'OthersAddresses.AddresseTypeParameter' is not CLS-compliant C:...\Units\OthersAddresses.ascx.cs public Address.AddressTypeEnum AddressTypeParameter { get { return _addressTypeParameter; } set { _addressTypeParameter = value; } } and this one: Warning as Error: Type of 'Global.UserInSession' is not CLS-compliant C:...\Global.asax.cs public static User UserInSession { get { return (HttpContext.Current.Session["CurrentUser"] == null) ? null : HttpContext.Current.Session["CurrentUser"] as User; } set { HttpContext.Current.Session["CurrentUser"] = value; } } I added attribute [CLSCompliant(false)] before UserInSession and AddresseTypeParameter and it works but I would like to understand why it was not CLS-compliant. Some more information about classes and enum: Class User (User.cs) public class User { private string _uniqueIdentifier; private string _password = string.Empty; private string _email = string.Empty; private string _passwordQuestion = string.Empty; private string _passwordAnswer = string.Empty; private string _id_directions_db = string.Empty; private string _id_gesab = string.Empty; private string _zipCode = string.Empty; private string _fonction_id = string.Empty; private string _fonction = string.Empty; private string _structure_id = string.Empty; private string _structure = string.Empty; private string _firstName = string.Empty; private string _lastName = string.Empty; private string _
Tags (comma-separated)
Save Edits
Cancel