This repository has been archived on 2025-09-07. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
dotnet-installer/TestAssets/TestProjects/ResourcesTests/TestLibraryWithResources/Program.cs

21 lines
549 B
C#
Raw Normal View History

using System;
using System.Resources;
using System.Reflection;
using System.Globalization;
namespace TestProjectWithCultureSpecificResource
{
public class Program
{
public static void Main(string[] args)
{
var rm = new ResourceManager(
"TestProjectWithCultureSpecificResource.Strings",
typeof(Program).GetTypeInfo().Assembly);
Console.WriteLine(rm.GetString("hello"));
Console.WriteLine(rm.GetString("hello", new CultureInfo("fr")));
}
}
}