From what I've been reading online, if the field is private it can start with a leading _. However when I do the following it complains? Is it because I'm returning the private field? Doesn't make sense to me since anything consuming this has no idea about _myObject so why would it matter?
private MyBusinessObject _myObjectBO;
protected MyBusinessObject MyObjectBO
{
get { return _myObjectBO ?? (_myObjectBO= new MyBusinessObject()); }
}
The message is stating that the property's type is not compliant.
Check the
MyBusinessObjectclass; many developers forgot to add[assembly: CLSCompliant(true)](unfortunately, it isn't part of the standard template)