How can I retrieve an embedded xml resource?

前端 未结 3 1055
逝去的感伤
逝去的感伤 2020-12-19 12:48

I added an XML file as an embedded resource in my class library by using the accessing the project properties in Visual Studio and then Resources | Add Resource | Add Existi

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-19 13:36

    I find it much easier to use the "Resources" tab of the project's properties dialog in Visual Studio. Then you have a generated strongly typed reference to your resource through:

    Properties.Resources.Filename
    

提交回复
热议问题