Get array item based on index

后端 未结 2 906
故里飘歌
故里飘歌 2021-01-21 11:42

I am trying to get an item from a char array based on the index that I have. I have used code earlier to get the index of a specified item but now I want the opposite, to get th

相关标签:
2条回答
  • 2021-01-21 12:18

    Assuming your char array is called ArrayOfChars and the index is i. It should be as simple as

    char arrayChar = ArrayOfChars[i];
    
    0 讨论(0)
  • 2021-01-21 12:36
    var arrayChar = yourArray[index];
    
    0 讨论(0)
提交回复
热议问题