如果对不起这个问题是没有意义的或愚蠢的我想创建一个窗口服务中,我有几类文件每类文件有一些调用另一个类文件的函数。
例如
类文件,一个有像
public bool CreateEmail()
{
try
{
//code here
}
catch (Exception ex)
{
//Write to Log
to create log call function from **another class file**
}
}
创建电子邮件的方法和更多的电话像this.I想知道如果使用静态类是好还是创建对象每个类和调用方法将better.Which是推荐的方式?
你应该看看这个问题:[何时在C#中使用静态类](http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp) –