using System;
[assembly:CLSCompliant(true)]
namespace CLSDoc
{
public class Cat
{
internal UInt16 _age = 0;
private UInt16 _daysTillVacination = 0;
//Warning CS3003 Type of 'Cat.DaysTillVacination' is not CLS-compliant
protected UInt16 DaysT...
using System;
[assembly:CLSCompliant(true)]
namespace CLSDoc
{
public class Car
{
internal UInt16 _yearOfCreation = 0;
//Warning CS3008 Identifier '_numberOfDoors' is not CLS-compliant
//Warning CS3003 Type of 'Car._numberOfDoors' is not CLS-compli...
using System;
[assembly:CLSCompliant(true)]
namespace CLSDoc
{
public class Car
{
//Warning CS3005 Identifier 'Car.CALCULATEAge()' differing only in case is not CLS-compliant
public int CalculateAge()
{
return 0;
}
...
using System;
[assembly:CLSCompliant(true)]
namespace CLSDoc
{
public class Car
{
//Warning CS3008 Identifier '_age' is not CLS-complian
public int _age = 0;
}
}
You can not start variable with _
using System;
[assembly:CLSCompliant(true)]
namespace CLSDoc
{
[CLSCompliant(false)]
public class Animal
{
public int age = 0;
}
//Warning CS3009 'Dog': base type 'Animal' is not CLS-compliant
public class Dog : Animal
{
}
}