c# string null or empty visual studio 2019 code example Example: c# check if string is empty if (string.IsNullOrEmpty(myString)) { // }