簡體   English   中英

MoveWindow參數-c#Func <>

[英]MoveWindow arguments - c# Func<>

我正在嘗試'導出'ac#函數以與IronPython和python for .Net一起使用。 我有以下幾點:

[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth,
int nHeight, bool bRepaint);
    public Func<> Main()
    {
        return MoveWindow;
    }

我正在嘗試將c#函數傳遞給python(不是我的問題,由IronPython處理)。 我的問題是我如何知道在Func<>的參數中輸入什么? 我嘗試過並得到Func<T1,T2,T3,T4,T5,T6,T7,T8,T9,TResult>作為參數的結構和數量。 但這意味着此處給出的類型定義不起作用,或者缺少一些。

我應該輸入什么類型? 或如何找到答案?

簽名是

 bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);

所以這是一個Func<IntPtr, int, int, int, int, bool, bool>

Func的最后一個類型參數是返回類型,如docs中所示

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM