Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要向输入您想查看的 id 记录的用户提出问题。用户应输入 id。那我怎么能在 C# 中做到这一点
你需要使用vb输入框。添加对 Microsoft.VisualBasic 的引用,InputBox 在 Microsoft.VisualBasic.Interaction 命名空间中
添加执行以下操作:
string input = Microsoft.VisualBasic.Interaction.InputBox("Prompt", "Title", "Default", 0, 0);