Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
An in parameter cannot have the Out attribute.
The parameter of a method can't be declared as read only, while informing interop marshaler to treat this parameter as writable by the native code.
OutAttribute will contradict to the in
keyword when marshalling.
Example
The following sample generates CS8355:
using System.Runtime.InteropServices;
class Program
{
public static void Example([Out] in int value) // CS8355
{
}
}
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.