if i have this code:
public interface IJobHelper
{
List<T> FilterwithinOrg<T>(IEnumerable<T> entities) where T : IFilterable;
}
is there anything that support doing something like this:
public interface IJobHelper
{
List<T> FilterwithinOrg<T>(IEnumerable<T> entities) where T : IFilterable or ISemiFilterable
}
so it will accept anything that supports one of two interfaces. I am basically trying to create an overload.
<< is the left shift operator. It is shifting the number 1 to the left 0 bits, which is equivalent to the number 1 .
In C programming language, %d and %i are format specifiers as where %d specifies the type of variable as decimal and %i specifies the type as integer. In usage terms, there is no difference in printf() function output while printing a number using %d or %i but using scanf the difference occurs.
The logical AND operator is represented as the '&&' double ampersand symbol. It checks the condition of two or more operands by combining in an expression, and if all the conditions are true, the logical AND operator returns the Boolean value true or 1. Else it returns false or 0.
As far as I know, you can use AND logic not OR.
AND (in this case, T must be child of IFilterable and ISemiFilterable)
public interface IJobHelper
{
List<T> FilterwithinOrg<T>(IEnumerable<T> entities) where T : IFilterable, ISemiFilterable
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With