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 167 views
1 answer 134 views
1 answer 181 views
3 answers 314 views
314 views asked Mar 22, 2015 by avibootz
1 answer 170 views
170 views asked Aug 15, 2022 by avibootz
1 answer 136 views
1 answer 183 views
...