Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ';MYPROGRAM.IO.MemoryStream';是一个';财产';但是像';类型';错误?_C#_Windows - Fatal编程技术网

C# ';MYPROGRAM.IO.MemoryStream';是一个';财产';但是像';类型';错误?

C# ';MYPROGRAM.IO.MemoryStream';是一个';财产';但是像';类型';错误?,c#,windows,C#,Windows,因此,我试图编写一些指向链接的代码,但将中间部分更改为用户键入的内容。例如: pictureBox1.Image = new System.Drawing.Bitmap(new IO.MemoryStream(new System.Net.Webclient().DownloadData("http://api.skype.com/users/" + textBox6.Text + "/profile/avatar"))); 我正在制作Skype工具,但唯一的问题是MemoryStream。上

因此,我试图编写一些指向链接的代码,但将中间部分更改为用户键入的内容。例如:

pictureBox1.Image = new System.Drawing.Bitmap(new IO.MemoryStream(new System.Net.Webclient().DownloadData("http://api.skype.com/users/" + textBox6.Text + "/profile/avatar")));
我正在制作Skype工具,但唯一的问题是
MemoryStream
。上面说

“MYPROGRAMNAME.IO.MemoryStream”是一个“属性”,但与“类型”一样使用


我不知道怎么了。我什么也找不到。

看起来您在项目中创建了另一个属性IO.MemoryStream。相反,您应该使用
System.IO.MemoryStream
名称空间。见下文修改

pictureBox1.Image = new System.Drawing.Bitmap(new System.IO.MemoryStream(new System.Net.WebClient().DownloadData("http://api.skype.com/users/" + textBox6.Text + "/profile/avatar")));

或者我的意思是,它从用户键入的内容(textbox6)的链接中获取图像。您创建了自己的IO类吗
MYPROGRAMNAME.IO
?当我使用您输入的代码时,它现在为我提供了一个名称空间error@AaronMendoza您的屏幕截图显示了
Webclient
何时应该是
Webclient
。你是如何编译的?我真的不知道,但我复制了你的,现在可以运行了,谢谢:)看起来像是命名空间问题。因为System.IO.MemoryStream类自1.1框架以来就存在