public class BaseReq
{
public String UserId { get; set;
}
public BaseReq()
{

}
}
public abstract class CommonReq:BaseReq
{

private String TransNo { get; set; }

public String SubmitData { get; set; }

private String Sign { get; set; }

public String Encoding { get; set; }

public CommonReq()
{
this.TransNo = Guid.NewGuid().ToString();
}
}
class Request:CommonReq
{

}
class Program
{
static void Main(string[] args)
{
Request req = new Request
{
SubmitData="A=1",
Encoding="utf-8"
};
var req2 = Activator.CreateInstance(typeof(Request)) as CommonReq;

}

}

05-11 18:00