Win32API
使ったらこんなコード分析エラーにおこられた。
エラーメッセージに書いてあるとおりNativeMethodsクラスに移動することで解決する。
public class Sample
{
internal static class NativeMethods
{
[DllImport("user32.dll")]
public static extern int GetWindowRect(IntPtr hwnd, ref Rectangle lpRect);
}
/// あとは適当に NativeMethods.GetWindowRectを呼び出せば分析エラーは出ない
}