Skip to content

Gendarme.Rules.Interoperability.PInvokeShouldNotBeVisibleRule(2.10)

Sebastien Pouliot edited this page Jan 22, 2011 · 2 revisions

PInvokeShouldNotBeVisibleRule

Assembly: Gendarme.Rules.Interoperability
Version: 2.10

Description

This rule checks for PInvoke declaration methods that are visible outside their assembly.

Examples

Bad example:

[DllImport ("user32.dll")]
public static extern bool MessageBeep (UInt32 beepType);

Good example:

[DllImport ("user32.dll")]
internal static extern bool MessageBeep (UInt32 beepType);
Clone this wiki locally