当前位置:网站首页>C # hide the keyboard input on the console (the input content is not displayed on the window)
C # hide the keyboard input on the console (the input content is not displayed on the window)
2022-06-12 07:56:00 【Lanterns can only come to the classroom to experience life】
Read character , And not on the screen
public class Program {
static void Main(string[] args) {
// Getting input from the keyboard , And not on the screen
//ReadKey(false) For display on screen
var msg = (char)(Console.ReadKey(true).Key);
Console.WriteLine($"msg : {
msg}");
Console.ReadLine();
}
}

Read a character , It's on the screen
public class Program {
static void Main(string[] args) {
var msg = Console.Read();// Read a character
Console.WriteLine($"msg : {
msg}");
Console.ReadLine();
Console.ReadLine();
}
}

Read a line , It's on the screen
public class Program {
static void Main(string[] args) {
var msg = Console.ReadLine();
Console.WriteLine($"msg : {
msg}");
Console.ReadLine();
}
}

边栏推荐
- Literature reading: raise a child in large language model: rewards effective and generalizable fine tuning
- LeetCode笔记:Weekly Contest 296
- Mathematical knowledge - derivation - Basic derivation knowledge
- Symfony 2: multiple and dynamic database connections
- Voice assistant - potential skills and uncalled call technique mining
- Voice assistant -- vertical class perpetual motion machine -- automated iteration framework
- Utilize user behavior data
- Arrangement of statistical learning knowledge points gradient descent, least square method, Newton method
- The R language uses the sample The split function divides the machine learning data set into training set and test set
- LeetCode笔记:Biweekly Contest 79
猜你喜欢

Some summaries of mathematical modeling competition in 2022

Voice assistant - Qu - ner and intention slot model

谋新局、促发展,桂林绿色数字经济的头雁效应

最新hbuilderX编辑uni-app项目运行于夜神模拟器

謀新局、促發展,桂林綠色數字經濟的頭雁效應

Chapter 4 - key management and distribution

In depth learning - overview of image classification related models

The computer is connected to WiFi but can't connect to the Internet

Scoring prediction problem

Introduction to coco dataset
随机推荐
20220526 损失函数
2021.10.31-11.1 scientific research log
Kalman filter encapsulation function
数值计算方法 Chapter5. 解线性方程组的直接法
经典论文回顾:Palette-based Photo Recoloring
Primal problem and dual problem
Leetcode notes: biweekly contest 69
LeetCode笔记:Weekly Contest 295
Literature reading: deep neural networks for YouTube recommendations
R语言e1071包的naiveBayes函数构建朴素贝叶斯模型、predict函数使用朴素贝叶斯模型对测试数据进行预测推理、table函数构建混淆矩阵
Leetcode notes: Weekly contest 277
Mathematical knowledge - matrix - matrix / vector derivation
Voice assistant - Qu - single entity recall
Numpy generates row vectors and column vectors (1024 water medal text)
Explanation and explanation on the situation that the volume GPU util (GPU utilization) is very low and the memory ueage (memory occupation) is very high during the training of pytoch
最新hbuilderX编辑uni-app项目运行于夜神模拟器
Rich dad, poor dad Abstract
The R language catools package divides the data, the scale function scales the data, the KNN function of the class package constructs a k-nearest neighbor classifier, and compares the model accuracy u
The project file contains toolsversion= "14.0". This toolset may be unknown or missing workarounds
Visual studio code batch comment and uncomment