【发布时间】:2010-10-16 14:04:36
【问题描述】:
当我需要检查方法的参数是否不为空时,通常是这种情况,例如:
public static bool operator <=
(ApplicationVersion i_app1, ApplicationVersion i_app2)
{
if (i_app1 == null) throw new ArgumentNullException("i_app1");
if (i_app2 == null) throw new ArgumentNullException("i_app2");
[...]
}
有没有办法(半)自动执行此操作,例如 Code sn-ps?自动完成?锐化器?
【问题讨论】:
标签: .net visual-studio autocomplete code-generation resharper