如何在UWP中使用System.Console [英] How to use System.Console in UWP

查看:209
本文介绍了如何在UWP中使用System.Console的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在UWP中使用Windows控制台。我知道这里有 System.Diagnostic.Debug ,但是它只为我提供了在Windows控制台中显示消息的方法,我想从控制台中读取信息。

I want to use windows console in UWP. I know that there is System.Diagnostic.Debug but it provides me only methods to display message in windows console and I want to read from the console.

推荐答案

System.Console 不适用于UWP应用。如果要创建控制台应用程序,请使用.NET Framework或.NET Core而非通用Windows平台。 System.Diagnostics.Debug 类仅用于调试目的,用户看不到其输出。

System.Console is not available for UWP apps. If you want to create console app, use .NET Framework or .NET Core not Universal Windows Platform. The System.Diagnostics.Debug class is just for debugging purposes and users don't see its output.

但是还有许多其他方法可以在UWP应用中获取用户的输入,例如 TextBox

However there are many other ways how to get user's input in UWP app, for example TextBox.

这篇关于如何在UWP中使用System.Console的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆