using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
namespace ConsoleApplication20jan
{
enum weekdays
{
}
struct emp
{
public void info()
{
}
}
interface i1
{
}
abstract class car
{
}
class Class9
{
static void Main()
{
//path of an assembly.
Assembly t = Assembly.LoadFrom(@"e:\jan2011\ConsoleApplication20jan\ConsoleApplication20jan\bin\Debug\ConsoleApplication20jan.exe");
Type[] z = t.GetTypes();
foreach (Type y in z)
{
if (y.IsInterface == true)
{
Console.WriteLine(y.Name + "---" + "is an interface");
}
if (y.IsAbstract == true)
{
Console.WriteLine(y.Name + "---" + "is abstract class");
}
if (y.IsClass == true)
{
Console.WriteLine(y.Name + "---" + "is a class");
}
if (y.IsValueType == true)
{
Console.WriteLine(y.Name + "---" + "is a value type");
}
}
}
}
}
//Note : i1 will be dispalyed as an interface as well an abstract class
// car will be displayed as an abstract class as well as a class