vendredi 3 mai 2019

How can I perform an action by setting up an if statement on the indexes between two 1-D arrays?

`// two global arrays string[] words1 = new string[] { "How are you?", "Where are you?" };

string[] words2 = new string[] {
"I'm fine.", "I'm outside."
 };

// how do I perform an action by showing the indexes are same
if(words1[0] == words2[0]) // I'm stuck here
{
    // an action will be executed.
}`

Aucun commentaire:

Enregistrer un commentaire