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.
「fish」という 1 つの単語を含むテキスト ファイルがありますが、単語の後にスペースが含まれます。とにかく単語fishを変数として引っ張ることができますが、スペースを残しますか?
string Text = File.ReadAllText("path_to_file.txt").trim();