32 lines
739 B
C#
32 lines
739 B
C#
/*
|
|
* Author: Nikolay Dvurechensky
|
|
* Site: https://www.dvurechensky.pro/
|
|
* Gmail: dvurechenskysoft@gmail.com
|
|
* Last Updated: 12 мая 2025 02:47:11
|
|
* Version: 1.0.3
|
|
*/
|
|
|
|
using System;
|
|
using Students;
|
|
|
|
namespace Extension
|
|
{
|
|
static class MyExtensions
|
|
{
|
|
public static void Print(this DateTime dateTime)
|
|
{
|
|
Console.WriteLine($"{dateTime.Day} {dateTime.Month} {dateTime.Year}");
|
|
}
|
|
|
|
public static bool IsDayOfWeek(this DateTime dateTime, DayOfWeek dayOfWeek)
|
|
{
|
|
return dateTime.DayOfWeek == dayOfWeek;
|
|
}
|
|
|
|
public static string GetFullName(this Student student)
|
|
{
|
|
return student.LastName + " " + student.FirstName;
|
|
}
|
|
}
|
|
}
|