This is an English language site, and we can only accept and answer questions in that language.
I have run this through Google Translate to produce a probably-good version, but you should check it and make sure it does say what you are actually asking.
Teh error is simple: the text in your text box
txtHost
cannot be interpreted as a
long
value: it contains characters other than the digits '0' to '9'.
That can't be "fixed" as it's an input data problem, and we have no access to that. But ... at a guess, it's an IP address like "192.168.0.1" which can;t be read as a long.
Start with the debugger, and find out exactly what the
TextBox
contains, then look for a solution from there. I'd guess that you want to use
IPAddress.Parse Method (System.Net) | Microsoft Docs[
^] rather than constructing a new
IPAddress
instance - but without access to you data, we can't be sure.
Google translate:
이것은 영어 사이트이며 해당 언어로만 질문을 수락하고 답변할 수 있습니다.
아마도 좋은 버전을 생성하기 위해 Google 번역을 통해 이것을 실행했지만, 당신은 그것을 확인하고 당신이 실제로 묻는 것을 말하는지 확인해야 합니다.
오류는 간단합니다. 텍스트 상자 txtHost
의 텍스트는 long
값으로 해석될 수 없습니다. 여기에는 '0'에서 '9'까지의 숫자가 아닌 다른 문자가 포함되어 있습니다.
그것은 입력 데이터 문제이기 때문에 "고칠" 수 없으며 우리는 그것에 접근할 수 없습니다. 하지만 ... 추측컨데 "192.168.0.1"과 같이 길게 읽을 수 없는 IP 주소입니다.
디버거로 시작하여 TextBox
에 포함된 내용을 정확히 찾은 다음 거기에서 솔루션을 찾으십시오. 나는 당신이 새로운 IPAddress
인스턴스를 생성하는 것보다 사용하기를 원할 것이라고 추측합니다. 그러나 당신의 데이터에 접근하지 않는다면 우리는 확신할 수 없습니다.