I have developed a code in CSOM(Client Side Object Module) using c# where before performing any operation on the list I want to check whether the list is null or not? In SSOM we can check that by
.TryGetList()
method
how I can achieve the same in CSOM.
if(list!= null){....}
is not working as it always goes into the if condition and throws the error in context.Update()
Is there any other way to achieve this without putting the
if(list!= null){....}
into try-catch
.