Direct load resource resx from assembly

beğeni durumu
lütfen bu nasılı oylayın!
[Toplam: 0 ortalama: 0]

Look this code.

assembly load from tr\WinformLangs.resources.dll this path.

and look here :
we are intialize resource manager with language locale string.

var fullPath = Path.Combine(Directory.GetCurrentDirectory(), "tr\\WinformLangs.resources.dll");
            Assembly assembly = Assembly.LoadFrom(fullPath);
            string[] resourceNames = assembly.GetManifestResourceNames();

            System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("", assembly);
            var t =resourceManager.GetString("Label1");

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.

This site uses Akismet to reduce spam. Learn how your comment data is processed.