I have a weird question about C#.
I have a static class to store methods as extensions. Then, I have the following extension:
public static bool fwHasData(this DataTable table)
{
return (table == null || table.Rows.Count == 0) ? true : false;
}
My question is: exists some way to avoid use the parentheses when I try to use the extension in my code?
Usage:
bool vHasData = MyDataTable.fwHasData(); // Works fine!
Expected usage:
bool vHasData = MyDataTable.fwHasData; // Removing the parentheses
Thanks a lot!