메신저 Visual Studio에서 문제가 발생하면 동일한 매개 변수 유형을 가진 멤버를 정의했다고 계속 말합니다. 임 C는 새로운 프로그래밍 및 정말 어떻게 해야할지 모르겠다.Visual Studio 2010 C#에서 "이미 동일한 매개 변수 형식의 멤버를 정의했습니다. 오류가 발생했습니다."
는오류 1 유형 'Secret.AddPage'이 (가) 이미 회원이
오류 2 유형 'Secret.AddPage가'이미 정의 같은 매개 변수 유형과 '같이 AddPage을'이라고 정의 다음은 발생하는 오류입니다 동일한 전화 번호 유형의 'PhoneApplicationPage_Loaded'
여기까지 제가 작성한 코드는 지금까지 어떤 도움도 크게 받으실 수 있습니다.
enter code here
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;
using System.Device.Location;
namespace secret
{
public partial class AddPage : PhoneApplicationPage
{
private string location = "";
public AddPage()
{
InitializeComponent();
GeoCoordinateWatcher myWatcher = new GeoCoordinateWatcher();
var myPosition = myWatcher.Position;
// Eftersom koden körs i emulatorn kan den inte få tillgång till riktiga GPS-värden
// Därför hårdkodas koordinaterna till slottet i Gamla stan så att MSR MAPS Web Services
//kan testas.
double latitude = 40.717;
double longitude = -74;
if (!myPosition.Location.IsUnknown)
{
latitude = myPosition.Location.Latitude;
longitude = myPosition.Location.Longitude;
}
myTerraService.TerraServiceSoapClient client = new myTerraService.TerraServiceSoapClient();
client.ConvertLonLatPtToNearestPlaceCompleted += new EventHandler<myTerraService.ConvertLonLatPtToNearestPlaceCompletedEventArgs>(client_ConvertLonLatPtToNearestPlaceCompleted);
client.ConvertLonLatPtToNearestPlaceAsync(new myTerraService.LonLatPt { Lat = latitude, Lon = longitude });
}
void client_ConvertLonLatPtToNearestPlaceCompleted(object sender, myTerraService.ConvertLonLatPtToNearestPlaceCompletedEventArgs e)
{
location = e.Result;
//throw new NotImplementedException();
}
private void AppBar_Cancel_Click(object sender, EventArgs e)
{
navigateBack();
}
private void AppBar_Save_Click(object sender, EventArgs e)
{ // spara en ny anteckning
if (location.Trim().Length == 0)
{
location = "Okänd";
}
navigateBack();
}
private void navigateBack()
{
NavigationService.Navigate(new Uri("/secret;component/NotesMainPage.xaml", UriKind.Relative));
}
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
editTextBox.Focus();
}
}
}
'여기에 코드 입력'부분이 있습니까? – mcalex
'부분 클래스 '는 다른 부분을 가지고 있습니까? –
"여기에 코드 입력"은 그 일부가 아닙니다. 그 부분 클래스에 의해 기본적으로, 정말 새로운 메신저 및 자습서를 수행하고 내 자신의 응용 프로그램에 구현하는 정확히 같은 짓을했는지 이러한 오류가 발생합니까? –