What is the purpose of new() in generic type constraint

前端 未结 0 1105
借酒劲吻你
借酒劲吻你 2020-11-28 14:48
public Stack where T: Demo, new()
{
}

public class Demo
{
 public void AccessDemoFunction()
 {
 }
}

My question here is, Suppose if we do

相关标签:
回答
  • 消灭零回复
提交回复
热议问题