linux-packaging-mono/mcs/tests/test-null-operator-10.cs

16 lines
227 B
C#
Raw Permalink Normal View History

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();
}
}