728x90
반응형
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Async_console_test
{
class Program
{
static void TempAction()
{
string Temp = Console.ReadLine();
Console.WriteLine("입력함 : [{0}]", Temp);
Task.Factory.StartNew(TempAction);
}
static void Main(string[] args)
{
Task.Factory.StartNew(TempAction);
while (true)
{
Console.Write(".");
Thread.Sleep(500);
}
}
}
}
Tested By VS2019
https://docs.microsoft.com/ko-kr/dotnet/api/system.threading.tasks.taskfactory.startnew?view=net-5.0
728x90
'기술자료 > C#' 카테고리의 다른 글
C# 소켓 억셉트 Socket Asynchronous Accept 초간단 소스 (0) | 2021.09.15 |
---|---|
C# Packet Capture Programming #4 - 패킷 출력 HexaView (0) | 2021.09.07 |
C# Packet Capture Programming #3 - 패킷 캡쳐 GetNextPacket (0) | 2021.09.07 |
static HexaViewer Class 구현 - ArraySegment 응용 (0) | 2021.09.07 |
C# Packet Capture Programming #2 - 캡쳐 장치 선정 ICaptureDevice (0) | 2021.09.01 |
C# Packet Capture Programming #1 (0) | 2021.09.01 |
예외처리 1 : try catch 문법 (0) | 2021.06.10 |
포인터 사용 C# Pointer unsafe (0) | 2021.04.29 |