Console.Clear();

Console Programming/C# Console 2019. 9. 20. 10:03

https://docs.microsoft.com/ko-kr/dotnet/api/system.console.clear?view=netframework-4.8

 

Console.Clear Method (System)

--> Console.Clear Console.Clear Console.Clear Console.Clear Method 정의 이 문서의 내용 콘솔 버퍼와 해당 콘솔 창에서 표시 정보를 지웁니다.Clears the console buffer and corresponding console window of display information. public: static void Clear(); public static void Clear (); static

docs.microsoft.com

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Syntax05
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("홍길동");
 
            Console.Clear();
 
 
        }
    }
}
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

 Console.Clear();  //콘솔의 내용을 지운다.

 

13번 줄에 의해 홍길동이 출력되었으나

 

15번 줄에 의해 지워졌다.

 

: