Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15728

[RESOLVED] IDE0031 "Null check can be simplified", but can it?

$
0
0
Probably it can, but I am not sure how, for reason stated in my comment!
Is there a better way to write this?

Code:

               
int rc = taCustomerSystemData.Update(txtCustNo.Text,
// 01/12/21 - IDE0029 "Null check can be simplified" - but I am not sure how. 
//  If it is null then I want null but if it's not null I want to covert it to a string.
dtLastSDReview.EditValue == null ? null : dtLastSDReview.EditValue.ToString(),
...


Viewing all articles
Browse latest Browse all 15728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>