I am using Visual Studio 2022
and I am struggling to figure out how to properly embed and use a resource file in order to use GetString()
.
teadates.txt:
DEC=December
MAR=March
Note that a teadates.Designer.cs file is now automatically added to the Solution Explorer.
- You can now access the string resources from code via for example
teadates.DEC
Or access the resource manager:
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(teadates.DEC);
Console.WriteLine(teadates.ResourceManager.GetString("DEC"));
}
}