⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testapp.cs

📁 Other things about csharp. you could learn from this
💻 CS
字号:


using CustomStreams;
using System.IO;
using System;

class Application
{

	static void Main()
	{
		UpperCaseStream customStream;
		
		
		// Create a file using our custom stream (using ASCII encoding)

		customStream = new UpperCaseStream( new FileStream( "file.txt", FileMode.Create ) );
		StreamWriter sw = new StreamWriter( customStream,  System.Text.Encoding.ASCII );

		int i;

		for (i=0;i<100;i++)
			sw.WriteLine("Hello World!");
		sw.Close();


		
		// Create our custom stream, passing it a file stream 

		customStream = new UpperCaseStream( new FileStream( "file.txt", FileMode.Open ) );
		StreamReader sr = new StreamReader( customStream );
		Console.WriteLine("{0}",sr.ReadToEnd() );
		customStream.Close();

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -