Vlad,
Can you post the your code between < pre > and < /pre> tags like in message#
1454141 Also, does this method work ?
static void Main()
{
string assemblyName = "BaseTest";
assemblyName = "System.Windows.Forms";
var list = GetModInfo(assemblyName);
foreach (var className in list)
{
Console.WriteLine("{0} : {1}", className.IsClass ? "Class" : "Struct", className.FullName);
}
Console.ReadLine();
}
public static List<Type> GetModInfo(string assemblyName)
{
var list = (from m in Assembly.Load(assemblyName).GetModules() select m.GetTypes().Where(x => x.IsClass)).ToList();
var theList = new List<Type>();
foreach (var m in list)
theList.AddRange(m);
return theList;
}
>Gregory
>Sorry for answer delay, I was out of job few days
>1 The problem, that string
>classList.AddRange(from x in module.GetTypes().Where(x => x.IsClass) select x);
>gives me error on '.where'
>The message system.array has no definition of where or some referenceor using is missing
>I have used for project NET 3.5
>I had referencies on Linq etc
>Intelesence also does not see- 'where' in module.GetTypes().Where, only equal
>Without 'from' variant the code works fine
>
>Other problem
>When I put my ready project dll on other computer,
>any referencies on any NET assymblies are not found. application trys to find it in working directory, instead of finding in net dll directory
>Old variant on 2005 studia with loadwithpathname(assembly) instead of Load works fine on other computer
>II mean, application try to find for example System.Windos.Forms.dll not in right place and sure does not find it
>All errors comes from Assembly.Load(assemblyName) does not matter whet is assembly name
>Other computer also has NEt 3.5 and all requied dll
Gregory