Answers for "Null check operator used on a null value"

C#
8

null coalescing operator c#

//the null coalescing operator for c# is ??
int? x = null;
int y = 9;
return x ?? y; 
//Will return the value of x if x is not null else return y
Posted by: Guest on May-06-2020
1

c# null conditional

//Return stirng representation of nullable DateTime
DateTime? x = null;
return x.HasValue == true ? x.Value.ToString() : "No Date";
Posted by: Guest on June-10-2020
0

Null check operator used on a null value

HomeController gg = Get.put(HomeController());
Posted by: Guest on October-09-2021
0

Null check

function exists (value) {
  return x != null ? Promise.resolve(value) : Promise.reject(`Invalid value: ${value}`)
}
Posted by: Guest on February-12-2020

C# Answers by Framework

Browse Popular Code Answers by Language