Показать сообщение отдельно
Старый 03.09.2005, 15:54     # 2
Al-x
Junior Member
 
Регистрация: 30.03.2003
Адрес: СПб
Сообщения: 162

Al-x МолодецAl-x МолодецAl-x Молодец
Короче сам разобрался
Код:
		
private System.Char[] tmpChars;
private byte[] tmpBytes;
......				
UnicodeEncoding Unicode = new UnicodeEncoding();
.....
BinaryReader binReader = new BinaryReader(File.Open(fileName, FileMode.Open));
.....
tmpChars = new System.Char[stringLength/2];
tmpBytes = new byte[stringLength];
tmpBytes = binReader.ReadBytes(stringLength);
tmpChars = Unicode.GetChars(tmpBytes);
tmpString = new String(tmpChars);
Некрасиво - зато работает. Может это как-нибудь проще можно сделать?
__________________
640Kbytes should be enough for everything! (c) Bill Gates, 1981.
Все "спасибо" в репутацию
Al-x вне форума