How to get the N char from a string in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        String s = "c# sharp";
        
        int N = 3;
  
        Console.WriteLine(s[N]);  
    }
}


/*
run:

s

*/

 



answered Oct 31, 2019 by avibootz

Related questions

1 answer 237 views
2 answers 308 views
308 views asked Oct 31, 2019 by avibootz
1 answer 224 views
1 answer 303 views
1 answer 229 views
1 answer 210 views
1 answer 243 views
...