Skip to content

Reading a string resource

The following example shows us reading the text content of a resource whose name ends with text-file.txt:

var content = typeof(JsonTestClass)
    .Assembly
    .ReadStringResource("text-file.txt");

// content will be "Text file"