csharp one line method

Code Example - csharp one line method

                
                        // looking for method expression? example usage:
public static bool IsNotNull(this string input) =>
  !string.IsNullOrEmpty(input);
                    
                
 

one line condition csharp

                        
                                ((a != null) ? (Action)(() => { b = a; }) : () => { /*Do something else*/ })();
                            
                        
 

Related code examples