Files
2025-03-24 12:56:43 +01:00

44 lines
989 B
C#

using System.ComponentModel;
namespace FileReadAndWrite.Model;
public class User : INotifyPropertyChanged
{
private string description;
private string email;
public int Id { get; set; }
public string Name { get; set; }
public string Surname { get; set; }
public string Description
{
get => description;
set
{
if (description != value)
{
description = value;
OnPropertyChanged(nameof(Description));
}
}
}
public string Email
{
get => email;
set
{
if (email != value)
{
email = value;
OnPropertyChanged(nameof(Email));
}
}
}
public event PropertyChangedEventHandler? PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}