** I have function that get an object as a parameter then trying to cast it as IEnumrable and check if itβs empty or at least have value Is there any better way to do that than the below**
Private bool empty(Object obj)
{
Bool empty=true;
If (obj is IEnumerable lst)
{
foreach (var item in IEnumerable lst)
{
empty=false;
break;
}
}