Reflection in C#

Posted by matt on Stack Overflow See other posts from Stack Overflow or by matt
Published on 2010-05-12T18:17:14Z Indexed on 2010/05/12 18:24 UTC
Read the original article Hit count: 162

Filed under:
|
        var victim = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Victim.dll");
        var assy = AppDomain.CurrentDomain.Load(System.IO.File.ReadAllBytes(victim));
        var types = from x in assy.GetTypes()
                    where x.Name.StartsWith("AwesomePage")
                    select x;
        var pageType = types.First();
        page = Activator.CreateInstance(pageType);
        this.Content = page;

Could someone tell me why a dll file would be targeted?

© Stack Overflow or respective owner

Related posts about reflection

Related posts about c#