Answers for "string.contains empty string c#"

C#
7

c# check if string is empty

if (string.IsNullOrEmpty(myString)) {
   //
}
Posted by: Guest on September-03-2020
0

c# string .contains against empty string returns

string toTest = "Hello World!";
bool containsResult = toTest.Contains(string.Empty); // containsResult = true
Posted by: Guest on August-23-2021

C# Answers by Framework

Browse Popular Code Answers by Language