2017-08-31 12 views
-2

型または名前空間「HTTPGET」は見つかりませんでした。 これは、私はいくつかの問題を抱えていたコードの私の一部です:私はC#でコーディングするのVisual Studioを使用してい

HttpGet req = new HttpGet(); 
req.Request("http://checkip.dyndns.org"); 
string[] a = req.ResponseBody.Split(':'); 
string a2 = a[1].Substring(1); 
string[] a3 = a2.Split('<'); 
string a4 = a3[0]; 
label3.Text = "Public IP Address: " + a4; 

私が含ま何:

using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Threading.Tasks; 
using System.Windows.Forms; 
using System.Net; 
using System.Net.Sockets; 
using System.Management; 
using static System.Object; 
using System.Net.Http; 

をそして、私はまだ、このエラーが出る:

The type or namespace "HTTPGet" could not be found.

は、私が何を行うことができます?

+1

にアップミックス「のSystem.Web」(:また、あなたはHttpWebRequestのに似た何かが必​​要アセンブリ参照がありませんか? –

+0

これはMVCプロジェクトですか? Webフォーム? Winforms? –

+0

@KobyDouek Windowsは、アプリケーション –

答えて

関連する問題