public static void Main()
try { RRS t1 = new RRS("A", "B", "C"); Console.WriteLine(t1);}
catch { Console.WriteLine("t1 not constructed");}
try { RRS t2 = new RRS(null, "B", "C"); Console.WriteLine(t2);}
catch { Console.WriteLine("t2 not constructed");}
catch { Console.WriteLine("t3 not constructed");}
public readonly record struct RRS
private readonly string a;
a = string.IsNullOrWhiteSpace(value)
? throw new ArgumentException(nameof(A))
private readonly string b;
b = string.IsNullOrWhiteSpace(value)
? throw new ArgumentException(nameof(B))
private readonly string c;
c = string.IsNullOrWhiteSpace(value)
? throw new ArgumentException(nameof(C))
public RRS(string a, string b, string c) {
A = string.IsNullOrWhiteSpace(a)
? throw new ArgumentException(nameof(a))
B = string.IsNullOrWhiteSpace(b)
? throw new ArgumentException(nameof(b))
C = string.IsNullOrWhiteSpace(c)
? throw new ArgumentException(nameof(c))