How to read embedded resource text file

前端 未结 22 2370
悲&欢浪女
悲&欢浪女 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 07:02

    I know this is old, but I just wanted to point out for NETMF (.Net MicroFramework), you can easily do this:

    string response = Resources.GetString(Resources.StringResources.MyFileName);
    

    Since NETMF doesn't have GetManifestResourceStream

提交回复
热议问题