Je veux exposer la méthode WebClient.DownloadDataInternal comme ci-dessous:Comment appeler une méthode avec un paramètre out?
[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 a un paramètre, je ne sais pas comment l'appeler. Aide!
La première ligne cann't être compilé. – ldp615
Man, vous êtes le meilleur! – Luca
que se passerait-il s'il y a une autre méthode surchargée ??? ------- 1 -------- test int (int i, chaîne sortante s) { s = ""; return 0; } -------------- et ----------- test int (int i) { return 0; } – MrClan