【发布时间】:2016-04-15 02:49:18
【问题描述】:
我不断收到“不一致的可访问性”的两个错误,表明“...比方法...更难访问”。
我一直在寻找解决这个问题的方法,每个答案基本上都是“公开课程”。
因此我被卡住了,因为课程已经公开了。
这里是错误发生的地方:
[DllImport("User32.Dll")]
public static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);
/// <summary>
/// Get the inner bounds of client window
/// </summary>
/// <param name="hWnd"></param>
/// <returns></returns>
public static RECT GetClientRect(IntPtr hWnd)
{
RECT result;
GetClientRect(hWnd, out result);
return result;
}
【问题讨论】:
-
阅读整个错误信息。它可能在抱怨
RECT。 -
你是对的。我把它改成了矩形,现在可以了。
标签: c#