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 206 views
1 answer 138 views
1 answer 182 views
3 answers 321 views
321 views asked Mar 22, 2015 by avibootz
1 answer 171 views
171 views asked Aug 15, 2022 by avibootz
1 answer 138 views
1 answer 186 views
...