问题描述
我正在使用套接字处理一个小应用程序。 环境是VBExpress 2015,net framework 4.7,Win10。 我正在尝试使用我从微软获得的代码片段:https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.getstream(v = vs.110).aspx
写入流但是当我执行该行时为
I'm working on a small application using sockets. The environment is VBExpress 2015, net framework 4.7, Win10. I'm trying to use a code snippet I got from Microsoft at https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.getstream(v=vs.110).aspx to write to the stream but when I execute the line
Dim sendBytes As [Byte]() = Encoding.UTF8.GetBytes("Is anybody there?")
我收到一个错误,说文件encoding.cs可以找不到。 任何人都可以帮我弄清楚这里发生了什么并纠正这个错误吗?
I get an error that says the file encoding.cs can't be found. Can anyone help me figure out what's happening here and correct this error?
TIA ...
推荐答案
Imports System.Text 'add this line
Public Class Form2
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim sendBytes As [Byte]() = Encoding.UTF8.GetBytes("Is anybody there?")
这篇关于'找不到Encoding.cs'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!