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.
如何自动将 txt 文件的内容加载到我的文本框。为了进一步解释当我启动我的程序时,我希望文本框显示 txt 文件中最后保存的条目。
看一下LoadFile方法,听起来它正是您需要的。
例如 MyTextBox.LoadFile("MyFile.txt");
MyTextBox.LoadFile("MyFile.txt");