How to Draw Box,Rectangle in a C# Console application(如何在 C# 控制台应用程序中绘制方框、矩形)
问题描述
我问了两个相关的问题.
I ask for 2 related questions.
1-我们如何将输出(例如结果和消息)放入 c# 控制台应用程序的框内.
1-How we can Put outputs(such as Results and Messages) inside a box in a c# console application.
2-我们如何在 c# 控制台应用程序中绘制矩形.感谢您提供任何示例教程或建议
2-How we can draw rectangle in a c# console application.thank u for any sample tutorial or advice
推荐答案
假设你的意思是一个字符框,这就可以了.
Assuming you just meant a character box this will do it.
我编辑了代码以在其中添加一条消息.您将需要在边界条件上做更多的工作.例如,消息中没有空格,一个比方框长的词,但这应该足以让你开始.
I edited the code to put a message in their. You will need to do more work on the boundary conditions. Ex no space in the message a word that is longer then the box but this should be enough to get you started.
这篇关于如何在 C# 控制台应用程序中绘制方框、矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!