Greg
Greg

Reputation: 746

Populating placeholders in a local resource file

I have the following text in a resource file.

Hello {{studentName}},
Your schedule is  ....

Is there a way to set the placeholder {{studentName}} to a given value, before loading the resource file? I've done this with strings, but not a resource file.

Upvotes: 0

Views: 267

Answers (1)

Greg
Greg

Reputation: 746

OK ... I feel dumb answering my own question, but here goes.

I just need to use the same formatting for strings. Update the file to show

Hello {0},
Your schedule is  ....


string.Format((string)GetLocalResourceObject("ContactText"), "Mike");

Too obvious I guess ...

Upvotes: 0

Related Questions