-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
49 lines (46 loc) · 1.05 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using DLLdotNetResourceReader;
using System;
using System.Linq;
using System.Reflection;
//using System.Resources.Extensions;
namespace DLLResourceReader
{
class Program
{
static void Main(string[] args)
{
var path = @"PATH"; // Your path to dll file
try
{
var assembly = Assembly.ReflectionOnlyLoadFrom(path);
var names = assembly.GetManifestResourceNames();
if (names.Count() == 0)
{
Console.WriteLine("No Resources");
Console.ReadKey();
}
else
{
for (int i = 0; i <= names.Count() - 1; i++)
{
Console.WriteLine("\n\n{0}", names[i]);
var stream = assembly.GetManifestResourceStream(names[i]);
var RR = new MyResourceReader(stream);
foreach (var entry in RR)
{
if (entry.Value is string)
{
Console.WriteLine(" ID: {0} - Value: '{1}' ", entry.Key, (string)entry.Value);
}
}
}
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Console.ReadKey();
}
}
}