String contains another two strings

前端 未结 17 1576
故里飘歌
故里飘歌 2020-12-15 07:12

Is it possible to have the contain function find if the string contains 2 words or more? This is what I\'m trying to do:

string d = \"You hit someone for 50          


        
17条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 07:42

    This is because d does not contain b + a (i.e. "someonedamage"), and therefore the application just terminates (since your Console.ReadLine(); is within the if block).

提交回复
热议问题