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 200 views
1 answer 180 views
1 answer 159 views
1 answer 173 views
1 answer 177 views
1 answer 172 views
1 answer 168 views
...