Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
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. |
Schafft mat eis op GitHub zesummen
D'Quell fir dësen Inhalt kann op GitHub fonnt ginn, wou Dir och Theeme schafen an iwwerpréiwen kënnt an Ufroen unhuele kënnt. Fir méi Informatiounen, gitt op eisen Auteur-Guide.