Pattern matching example
Code × Dismiss alert dashedLine(“50”); newDashed(“100”); Console.WriteLine(isIdesOfMarch(new DateTime(DateTime.Today.Year, 1, 13))); Console.WriteLine(isIdesOfMarch(new DateTime(DateTime.Today.Year, 3, 15))); Console.WriteLine(isIdesOfMarch(new DateTime(DateTime.Today.Year, 3, 17))); //is expression…to test the constant pattern //is expression also used to with whats called declaration pattern string? str = null; if (str is not null) Console.WriteLine(“not null”); else Console.WriteLine(“null”); //declaration pattern void newDashed(object o) { //”50″..l=50 //50…l=50 … Read more