Tag: 输出参数

我怎样才能调用一个out参数的方法?

我想要公开WebClient.DownloadDataInternal方法如下所示: [ComVisible(true)] public class MyWebClient : WebClient { private MethodInfo _DownloadDataInternal; public MyWebClient() { _DownloadDataInternal = typeof(WebClient).GetMethod("DownloadDataInternal", BindingFlags.NonPublic | BindingFlags.Instance); } public byte[] DownloadDataInternal(Uri address, out WebRequest request) { _DownloadDataInternal.Invoke(this, new object[] { address, out request }); } } WebClient.DownloadDataInternal有一个out参数,我不知道如何调用它。 帮帮我!