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;

}

}

相关文章:

  • 2021-05-24
  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2021-07-24
猜你喜欢
  • 2021-08-08
  • 2021-06-29
  • 2022-12-23
  • 2021-08-30
  • 2021-05-25
  • 2022-12-23
  • 2022-02-04
相关资源
相似解决方案