SyntaxFix
Write A Post
Hire A Developer
Questions
The following will return NULL if the array is empty, else the last element.
var item = (arr.Length == 0) ? null : arr[arr.Length - 1]