How to copy character from string to char in C#

1 Answer

0 votes
using System;
 
class Program
{
    static void Main() {
        string s = "c# programming";
         
        char ch = s[3];
        
        Console.WriteLine(ch);
    }
}
 
 
 
/*
run:
 
p
 
*/

 



answered Nov 28, 2019 by avibootz

Related questions

1 answer 374 views
1 answer 244 views
1 answer 270 views
3 answers 462 views
462 views asked Mar 22, 2015 by avibootz
1 answer 290 views
290 views asked Aug 15, 2022 by avibootz
1 answer 215 views
1 answer 253 views
...