C# Static types cannot be used as parameters

前端 未结 8 2609
被撕碎了的回忆
被撕碎了的回忆 2021-02-18 13:22
public static void SendEmail(String from, String To, String Subject, String HTML, String AttachmentPath = null, String AttachmentName = null, MediaTypeNames AttachmentTy         


        
8条回答
  •  长发绾君心
    2021-02-18 13:34

    You can wrap static types around an interface or another non-static class and add that as the parameter. Not ideal but a way around it. Or simply just reference the static type in the method body itself.

提交回复
热议问题