Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
3,011 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What's the correct way to access a string resource and use its placeholders? The method I tried didn't work for me.
Name: MyPlaceholders
Value: {0} ({1})
What I want to put in each placeholder: Hello (World)
C#
resourceLoader.GetString("MyPlaceholders")
Current result
{0} ({1})
As the resource holds the format, you need to populate it.
string.Format(resourceLoader.GetString("MyPlaceholders"), "Hello", "World")