C# Program To Maintain Attendance Record
C# Program To Maintain Attendance Record
using System.IO;
namespace deleevenattenapp
{
public class delegateevent
{
public delegate void attendanceloghandler(string message);
public event attendanceloghandler eventlog;
public void logprocess()
{
string reason=null;
Console.WriteLine("enter ur name:");
string usrname=Console.ReadLine();
DateTime t = DateTime.Now;
int hr= t.Hour;
int mm= t.Minute;
if (!(hr >= 11 && hr < 12 || (hr == 12 && mm == 0)))
{
class recordattendance
{
static void logger(string loginfo)
{
Console.WriteLine(loginfo);
}
static void Main(string[] args)
{
attendancelogger filelog = new
attendancelogger("c:\\process.log");
delegateevent devent= new delegateevent();
devent.eventlog += new delegateevent.attendanceloghandler(logger);
devent.eventlog += new
delegateevent.attendanceloghandler(filelog.logger);
devent.logprocess();
Console.ReadLine();
filelog.close();
}
}
}