22
1
using System;
2
3
var name = new UserName();
4
Console.WriteLine(name);
5
6
public class UserName
7
{
8
private string Value { get; }
9
10
/*public UserName(string value)
11
{
12
if (string.IsNullOrEmpty(value))
13
{
14
throw new ArgumentNullException(nameof(value));
15
}
16
17
Value = value;
18
}*/
19
20
public override string ToString() => $"The value is: {Value}";
21
}
22
Cached Result