Skip to content

Instantly share code, notes, and snippets.

@EFLFE
EFLFE / DuplexTextStream
Created October 31, 2017 13:20
DuplexTextStream combined FileStream, StreamWriter and StreamReader in one class.
using System;
using System.Diagnostics;
using System.IO;
namespace EFLFE
{
[DebuggerDisplay("DuplexTextStream: {FileName}")]
public sealed class DuplexTextStream : FileStream
{
// What? Single Responsibility Principle? I don't understand what you're talking about.
@EFLFE
EFLFE / YandexTranslateAPI_1_5_xml
Created August 22, 2014 15:11
Yandex Translate API 1.5 xml
using System;
using System.IO;
using System.Net;
using System.Xml;
namespace TryYandexTranslateAPI
{
// Перевод текста с помощью Yandex переводчика.
// http://api.yandex.ru/translate/doc/dg/concepts/api-overview.xml
// Код взят из сайта http://jobtools.ru/2014/05/yandex-translate-api-1-5-v-c/