What are relaxed exceptions in .NET / C #?

I found the CompilationRelaxations attribute on the assembly, looking at it in Reflector. This link says the attribute indicates whether:

Optimizers get extra latitude for relaxed exceptions.

What are relaxed exceptions and what does the compiler do with its “extra breadth” with them.

+4
source share
1 answer

This allows the compiler to have great flexibility in its optimization.

For more information, see the help for the CompilationRelaxations enumeration .

--- EDIT ---

At this point, there is one enumeration that uses the attribute, with only one parameter: NoStringInterning

From MSDN Help:

  Marks an assembly as not requiring string-literal interning.

 In an application domain, the common language runtime creates one string 
 object for each unique string literal, rather than making multiple copies.
 This behavior, called string interning, internally requires building 
 auxiliary tables that consume memory resources. 

This attribute is specified for enumeration use, however, so more parameters can be easily added later. This is the only optimization allowed with this build attribute right now.

+4
source

All Articles