How to get particular character position from string using C#

后端 未结 1 463
时光说笑
时光说笑 2021-01-06 08:38

This is very basic question but I am not able to find the position of a particular character. For example:

string a = \"ABCDE\"; 

I want th

相关标签:
1条回答
  • 2021-01-06 08:49

    Use IndexOf

    var pos = a.IndexOf('E');
    
    0 讨论(0)
提交回复
热议问题