summaryrefslogtreecommitdiff
path: root/mcs/tests/test-null-operator-10.cs
blob: 1822fb76a66deb9e11bba5bf4676320d480231a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;

class Event
{
	public string Name { get; set; }
	public string Foo { get; set; }
}

class X
{
	public static void Main ()
	{
		var evt = new Event();
		string str = (evt.Foo != null ? evt?.Name : "").Trim();
	}
}