/WorldView/Utilities/Util.cs
C# | 24 lines | 22 code | 2 blank | 0 comment | 2 complexity | e9041d67bfd3ff7ba2debdcb9ab025b8 MD5 | raw file
- using System;
- using System.Reflection;
-
- namespace MoreTerra.Utilities
- {
-
- public static class Util
- {
- public static Type GetResourceAssemblyType()
- {
- foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
- {
- foreach (Type t in assembly.GetTypes())
- {
- if (t.Name == "Resources")
- {
- return t;
- }
- }
- }
- throw new ApplicationException("Cannot find the Resource Assembly");
- }
- }
- }