Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> C#

คลาส System.Console และเมธอดใน C#

System.Console แทน Standard Input, Output, Error Streams สำหรับ Console Application

เมธอดสำคัญ (อ้างอิง MSDN):

ลำดับMethod & Description
1Beep() - เล่นเสียง Beep
2Beep(Int32,Int32) - เล่นเสียง Beep ระบุความถี่และระยะเวลา
3Clear() - ล้าง Console Buffer และหน้าจอ
4MoveBufferArea(...) - คัดลอกพื้นที่หน้าจอ
5MoveBufferArea(...) with Char/Color - คัดลอกพร้อมสีและตัวอักษร
6OpenStandardError() - เปิด Standard Error Stream
7OpenStandardError(Int32) - เปิด Error Stream ระบุ Buffer Size
8OpenStandardInput() - เปิด Standard Input Stream
9OpenStandardInput(Int32) - เปิด Input Stream ระบุ Buffer Size
10OpenStandardOutput() - เปิด Standard Output Stream
11OpenStandardOutput(Int32) - เปิด Output Stream ระบุ Buffer Size
12Read() - อ่านตัวอักษรถัดไปจาก Input
13ReadKey() - อ่าน Key ที่กด แสดงบน Console