How do I Compare two char[] arrays for equivalency?

前端 未结 5 407
眼角桃花
眼角桃花 2021-01-14 05:52

Right now, I have two char arrays, foo1[] and foo2[]. When I convert them to string and output to the console, they BOTH appear as

5条回答
  •  抹茶落季
    2021-01-14 06:20

    I think you can use the SequenceEquals to compare the arrays, even though checking both lengths at first has better performance.

提交回复
热议问题