Programming security is one of the harder development tasks. .NET creates fairly secure code by default, but code-access security (CAS) can be difficult to implement correctly and to verify.