'找不到Encoding.cs'错误

编程入门 行业动态 更新时间:2024-10-25 04:17:22
本文介绍了'找不到Encoding.cs'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用套接字处理一个小应用程序。环境是VBExpress 2015,net framework 4.7,Win10。我正在尝试使用我从微软获得的代码片段:https://msdn.microsoft/en-us/library/system.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 atmsdn.microsoft/en-us/library/system.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 ...

推荐答案

您是否有适当的编码参考?尝试在表单类之前将此system.text导入添加到表单的顶部。

Do you have the proper reference for the encoding? Try adding this system.text importsto the top of your form before the form class. 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'错误

本文发布于:2023-11-03 15:53:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555504.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   错误   cs   Encoding

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!