﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Релиб / Программирование / .NET / VB.NET  / Как перевести String в Array of Bytes? (VB.NET) / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Релиб</description><link>http://www.relib.com/forums/</link><webMaster>robot@relib.com</webMaster><lastBuildDate>Sun, 06 Jul 2008 00:30:09 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Как перевести String в Array of Bytes? (VB.NET)</title><link>http://www.relib.com/forums/Topic786142-27-1.aspx</link><description>Error  The targeted version of the .NET Compact Framework does not support latebound overload resolution.&lt;/P&gt;&lt;P&gt;как победить?</description><pubDate>Tue, 29 Aug 2006 02:52:00 GMT</pubDate><dc:creator>akucher</dc:creator></item><item><title>RE: Как перевести String в Array of Bytes? (VB.NET)</title><link>http://www.relib.com/forums/Topic786142-27-1.aspx</link><description>А правильный ответ таков : чтоб перевести Unicode строку в массив байтов надо знать в какую кодировку переводить. А далее у System.Text.Encoding есть метод GetBytes(string)&lt;BR&gt;&lt;BR&gt;Т.е. простейший случай для win1251 &lt;BR&gt;&lt;BR&gt;System.Text.Encoding.GetEncoding(&amp;quot;windows-1251&amp;quot;).GetBytes(sss);</description><pubDate>Thu, 19 Jun 2003 15:54:00 GMT</pubDate><dc:creator>tahorg</dc:creator></item><item><title>RE: Как перевести String в Array of Bytes? (VB.NET)</title><link>http://www.relib.com/forums/Topic786142-27-1.aspx</link><description>Без потери информации, наверно, никак&lt;BR&gt;А перевести в массив ushort можно так&lt;BR&gt;[code]&lt;BR&gt;using System;&lt;BR&gt;public class Sssss {&lt;BR&gt;  static public void Main() {&lt;BR&gt;    string s = &amp;quot;фыва&amp;quot;;&lt;BR&gt;    ushort[] t = new ushort[4];&lt;BR&gt;    for(int i=0; i&amp;lt;4; i++) t[i] = s[i];&lt;BR&gt;    Console.WriteLine(&amp;quot;{0} {1}&amp;quot;, s[2], t[2]);  // в 1074&lt;BR&gt;  }&lt;BR&gt;}&lt;BR&gt;[/code]</description><pubDate>Wed, 18 Jun 2003 19:51:00 GMT</pubDate><dc:creator>palva</dc:creator></item><item><title>Как перевести String в Array of Bytes? (VB.NET)</title><link>http://www.relib.com/forums/Topic786142-27-1.aspx</link><description>Subj&lt;BR&gt;&lt;BR&gt;ГРОМАДНОЕ СПАСИБА ЗА ПРАВИЛЬНЫЙ ОТВЕТ! :)</description><pubDate>Wed, 18 Jun 2003 18:10:00 GMT</pubDate><dc:creator>Newbie</dc:creator></item></channel></rss>