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 211 views
1 answer 186 views
1 answer 167 views
1 answer 182 views
1 answer 189 views
1 answer 179 views
1 answer 176 views
...