开发者

Error DownloadStringCompletedEventHandler

开发者 https://www.devze.com 2023-02-15 07:31 出处:网络
i don\'t understand where is the error ... using System.Xml.Linq; using System; using System.Collections.Generic;

i don't understand where is the error ...

using System.Xml.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;


namespace xmldow
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void clickBott(object sender, RoutedEventArgs e)
        {
            WebClient client = new WebClient();
            client.DownloadStringCompleted += new DownloadStringComp开发者_C百科letedEventHandler(client_DownloadStringCompleted);
            client.DownloadStringAsync(new Uri("http://example.net/ddd/my.xml"));

        }

        void client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventHandler e)
        {
            throw new NotImplementedException();


        }
    }
}

This is the error:

Error 1 No overload for 'client_DownloadStringCompleted' matches delegate 'System.Net.DownloadStringCompletedEventHandler'

Thank


The client_DownloadStringCompleted method should look like this instead:

private void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
    throw new NotImplementedException();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消