我正在尝试发送网络服务电子邮件,但收到错误 Must have return type。而且我不知道如何处理这个问题,因为我是 C# 的新手。
代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
namespace Email_Service
{
public partial class Service1 : ServiceBase
{
public string name;
public Service1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
}
protected override void OnStop()
{
}
public Notification(){
name = "Denmark";
return name;//I'm just trying this if its work but its not working....
}
}
}