How to copy character from string to char variable in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        string s = "c# java php";
        
        char ch = s[3];
 
        Console.Write(ch);
    }
}




/*
run:

j

*/

 



answered Nov 16, 2019 by avibootz

Related questions

1 answer 282 views
1 answer 271 views
1 answer 236 views
1 answer 257 views
1 answer 275 views
1 answer 261 views
1 answer 265 views
...