What is type-safety?

nightcoder picture nightcoder · May 29, 2009 · Viewed 10.8k times · Source

I had a brainbench exam recently, got high mark, but there were a couple of questions which were hard for me. Maybe it's because english is not my native language... One of the questions is:

Which one of the following describes type-safety?

  1. A programming construct used to ensure the security of reference and value types in the CLR
  2. The protection from memory leakage as a result of disallowing unmanaged access
  3. The CLR-specific feature providing assurances that types may not access memory outside their own AppDomain
  4. A mechanism created to protect assemblies and their types by the use of strong-named keys
  5. The concept dealing with assurances that allocated objects are always accessed in compatible ways

I think it's 1 or 5, but they sound weird to me anyway :(

What do you think?

Answer

oscarkuo picture oscarkuo · May 29, 2009

Actually I think it's Choice 5 because type safety has nothing to do with Security.