Logo

Programming-Idioms

History of Idiom 39 > diff from v47 to v48

Edit summary for version 48 by as:
[C#] sad

Version 47

2020-05-21, 20:32:25

Version 48

2020-06-11, 13:12:41

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Variables
ok,word,s
Variables
ok,word,s
Code
var ok = s.Contains(word);
Code
var s = 1;
if(s!=0){
MessageBox.Show("Hola");
}