Visual C#에서 버튼 클릭 이벤트에 전달하고 싶습니다. 나는 그것을하는 방법을 모른다. 여기에 코드가 있습니다.주 버튼에서 클릭 이벤트로 변환
public static void Main(string[] args){
UdpClient udpc = new UdpClient(args[0],2055);
IPEndPoint ep = null;
while(true) {
Console.Write("Name: ");
string name = Console.ReadLine();
if(name == "") break;
byte[] sdata = Encoding.ASCII.GetBytes(name);
udpc.Send(sdata,sdata.Length);
byte[] rdata = udpc.Receive(ref ep);
string job = Encoding.ASCII.GetString(rdata);
Console.WriteLine(job);
}
}
WPF, Windows Forms which? –
콘솔 앱에서 button_click이 보입니까? –
'get in Visual Studio' 란 무엇을 의미합니까? 당신은'Debug.WriteLine()'을 할 수 있고 출력 창에서이 메시지를 관찰 할 수 있습니다. – sll