Sanjeev Singh
What is Type safety in .NET?
By Sanjeev Singh in ASP.NET on Jan 02 2009
  • f k
    Sep, 2009 7

    In .net CLR when code runs then it is checked whether for var.s that particular option is applicable for given var depending on its type also it checks whether particualr operation is allowed or not .

    i.e. for int var concatenation operation is not allowed

    • 0
  • Purushottam Rathore
    Jan, 2009 2

    Type safe code can access only the memory locations that it has permission to execute. Type safe code can never access any private members of an object. Type safe code ensures that objects are isolated from each other and are therefore safe for inadvertent or malicious corruption. CLR performs a mandatory type safety check, called verification, during JIT compilation. This is done by a tool called peverify.exe, which examines the Microsoft Intermediate Language and the metadata included in the assembly. If an assembly (or code) is successfully verified as type safe, it is called verifiably type safe code. The code is said to be verifiably type safe when any references to the types inside that code are strictly compatible with the types they are referring to.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS