Nota
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tidħol jew tibdel id-direttorji.
L-aċċess għal din il-paġna jeħtieġ l-awtorizzazzjoni. Tista’ tipprova tibdel id-direttorji.
Portability rules support portability across different platforms. Interoperability rules support interaction with COM clients.
In this section
| Rule | Description |
|---|---|
| CA1401: P/Invokes should not be visible | A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed. |
| CA1416: Validate platform compatibility | Using platform-dependent APIs on a component makes the code no longer work across all platforms. |
CA1417: Do not use OutAttribute on string parameters for P/Invokes |
String parameters passed by value with the OutAttribute can destabilize the runtime if the string is an interned string. |
| CA1418: Use valid platform string | Platform compatibility analyzer requires a valid platform name and version. |
| CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' | Providing a parameterless constructor that is as visible as the containing type for a type derived from System.Runtime.InteropServices.SafeHandle enables better performance and usage with source-generated interop solutions. |
| CA1420: Property, type, or attribute requires runtime marshalling | Using features that require runtime marshalling when runtime marshalling is disabled will result in runtime exceptions. |
| CA1421: Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied | A method uses runtime marshalling, and runtime marshalling is explicitly disabled. |
| CA1422: Validate platform compatibility | Calling an API that's obsolete in a given OS (version) from a call site that's reachable from that OS (version) is not recommended. |
Ikkollabora magħna fuq GitHub
Is-sors għal dan il-kontenut jista’ jinstab fuq GitHub, fejn tista’ wkoll toħloq u tirrevedi l-problemi u t-talbiet għall-immerġjar. Għal aktar informazzjoni, ara l-gwida għall-kontributuri tagħna.