using System;
public class Program
{
public static void Main()
Class c = new Class{ Property = 1};
}
class Class
int field;
int propertyBackingField;
public int Property
set // and no get-access
bool valueIsNegative = isNegative(value); // Method call. Client does not expect.
if(valueIsNegative)
throw new ArgumentException(); // Throwing an exception. Client does not expect.
field = -value; // Changes another field. Client does not expect.
propertyBackingField = value;
private bool isNegative(int value)
return value < 0;