C#


ROSLYN.INTEROPERABILITY.CA1417 : Do not use 'OutAttribute' on string parameters for P/Invokes (C#)

See Roslyn-Detected C# Warning Classes for more information.

Summary

String parameters passed by value with the 'OutAttribute' can destabilize the runtime if the string is an interned string.

This check corresponds to Roslyn rule CA1417. For full rule details, see the Microsoft website: CA1417.

Properties

Class Name Do not use 'OutAttribute' on string parameters for P/Invokes (C#)
Significance reliability
Mnemonic ROSLYN.INTEROPERABILITY.CA1417
Categories None
Availability Available for C# only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Do not use 'OutAttribute' on string parameters for P/Invokes (C#)"

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.