Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to add an embedded resource in visual studio code

//Add this item in your .csproj file
<ItemGroup>
  <EmbeddedResource Include="GreetingResources.resources" />
</ItemGroup>

//Also, when referencing the resource, make sure you include the namespace relevant to it.

ResourceManager rm = new ResourceManager("namespace.GreetingResources",
                                         typeof(ClassName).Assembly);
 
PREVIOUS NEXT
Tagged: #add #embedded #resource #visual #studio #code
ADD COMMENT
Topic
Name
6+7 =