using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DesiredContractLibrary;
using System.Reflection;

namespace WebApplicationPart
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var asm = Assembly.LoadFile(@"C:\Users\vitor.rubio\Dropbox\projetos\Exemplos\C#\WebDependencyLab_4th_example_reflection\DesiredClassLibrary\bin\Debug\DesiredClassLibrary.dll");
            var type = asm.GetType("DesiredClassLibrary.DesiredClass");
            var client = Activator.CreateInstance(type) as DesiredContract;
            if (client == null) throw new Exception("broke");

            client.Name = "vitor";
            Response.Write(client.GetHello());

        }
    }
}