How to read embedded resource text file

前端 未结 22 2365
悲&欢浪女
悲&欢浪女 2020-11-21 06:03

How do I read an embedded resource (text file) using StreamReader and return it as a string? My current script uses a Windows form and textbox that allows the

22条回答
  •  执念已碎
    2020-11-21 06:51

    adding e.g. Testfile.sql Project Menu -> Properties -> Resources -> Add Existing file

        string queryFromResourceFile = Properties.Resources.Testfile.ToString();
    

提交回复
热议问题