콘솔을 통해 Caps Lock이 켜져 있는지 꺼져 있는지 확인하려면 코드는 다음과 같습니다. -
예
using System;
public class Demo{
public static void Main(string[] args){
Console.WriteLine("The CAPS LOCK is on or not? "+ Console.CapsLock);
}
} 출력
이것은 다음과 같은 출력을 생성합니다 -
The CAPS LOCK is on or not? False
예
콘솔을 통해 Num Lock이 켜져 있는지 꺼져 있는지 확인하는 코드는 다음과 같습니다 -
using System;
public class Demo{
public static void Main(string[] args){
Console.WriteLine("The Num LOCK is on or not? "+ Console.NumberLock);
}
} 출력
이것은 다음과 같은 출력을 생성합니다 -
The Num LOCK is on or not? True