You can work something out using lambda’s, but it will not be a clean syntax:
return (chkStatus
? (Func<object>)(() => {
DoLog(cmd.CommandText);
return obj;
})
: () => null)();
More Related Contents:
- A textbox/richtextbox that has syntax highlighting? [C#] [closed]
- How do I make a textbox that only accepts numbers?
- How can I save application settings in a Windows Forms application?
- How to add a new row to datagridview programmatically
- How to use WinForms progress bar?
- C# listView, how do I add items to columns 2, 3 and 4 etc?
- Complex UI inside ListBoxItem
- How can I get the PID of the parent process of my application
- How to make multi-language app in Winforms?
- Trying to use the C# SpellCheck class
- What setup code should go in Form Constructors versus Form Load event?
- How to access Winform textbox control from another class?
- Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug
- How to draw on a zoomed image?
- Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?
- Unable to copy a file from obj\Debug to bin\Debug
- No ItemChecked event in a CheckedListBox?
- Data binding for TextBox
- How do you automatically resize columns in a DataGridView control AND allow the user to resize the columns on that same grid?
- Can’t use System.Windows.Forms
- Run the current application as Single Instance and show the previous instance
- How to draw a shape using GraphicsPath to create the Region of a Custom Control?
- What is the difference between User Control, Custom Control and Component?
- Is this pattern matching expression equivalent to not null
- Hide some properties in PropertyGrid at run-time
- C# application both GUI and commandline
- Drop shadow in Winforms Controls?
- Update label from another thread [duplicate]
- SQL connection string for microsoft access 2010 .accdb
- Remove top and bottom padding from Text drawn on an Image