System.Runtime.InteropServices.DefaultCharSetAttribute Class

Specifies the value of the System.Runtime.InteropServices.CharSet enumeration. This class cannot be inherited.

See Also: DefaultCharSetAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Module, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class DefaultCharSetAttribute : Attribute

Remarks

Apply the System.Runtime.InteropServices.DefaultCharSetAttribute attribute at the assembly level or module level to set the DllImportAttribute.CharSet value for any call to System.Runtime.InteropServices.DllImportAttribute that does not include a DllImportAttribute.CharSet named argument specified by the user.

A DllImportAttribute.CharSet named argument specified by the user overrides the setting of System.Runtime.InteropServices.DefaultCharSetAttribute.

Note:

Only the C# and Visual Basic compilers recognize this attribute; it is not used by the C++ compiler.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0