I'm trying to create an instance of HttpPostedFile with
var obj2 = Activator.CreateInstance(
typeof(HttpPostedFile),
BindingFlags.NonPublic | BindingFlags.Instance,
null,
new object[] { },
System.Globalization.CultureInfo.CurrentCulture
);
but I'm getting the error 'Constructor on type 'System.Web.HttpPostedFile' not found.'.
Is there another way to create an instance of HttpPostedFile or am I doing something wrong?