如果對不起這個問題是沒有意義的或愚蠢的我想創建一個窗口服務中,我有幾類文件每類文件有一些調用另一個類文件的函數。
例如
類文件,一個有像
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) –