【问题标题】:how to display .txt file values in textbox or datagrid using c# [closed]如何使用 c# 在文本框或数据网格中显示 .txt 文件值 [关闭]
【发布时间】:2014-06-13 17:24:53
【问题描述】:

我正在开发一个应用程序。我需要在文本框中显示 .txt 文件值。 那么谁能告诉我使用c#在文本框或数据网格中显示.txt文件值的代码吗?

【问题讨论】:

  • 堆栈溢出不是代码生成器

标签: c# textbox wpfdatagrid


【解决方案1】:

试试这个:

string fileTxt = File.ReadAllText(@"c:\.....");
textbox.Text = fileTxt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-15
    • 2017-09-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多