forked from VictorPhilipp/OptionsFramework
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUtil.cs
More file actions
28 lines (27 loc) · 673 Bytes
/
Util.cs
File metadata and controls
28 lines (27 loc) · 673 Bytes
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
using System;
using System.Linq;
namespace OptionsFramework
{
internal class Util
{
public static Type FindType(string className)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
try
{
var types = assembly.GetTypes();
foreach (var type in types.Where(type => type.Name == className))
{
return type;
}
}
catch
{
// ignored
}
}
return null;
}
}
}