Violation of CLS rule Identifier

suggest change
using System;

[assembly:CLSCompliant(true)]
namespace CLSDoc
{
   
    public class Car
    {
        //Warning CS3008  Identifier '_age' is not CLS-compliant
        public int _age = 0;    
    }

}

A public identifier in a CLS-compliant assembly cannot start with _.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents