+ 1

hello, how tou use char in c# please get some example to me

thanks to answer me

6th Aug 2016, 3:48 PM
johny
4 Answers
+ 2
Hi Johny Example: static void Main(string[] args) { char x = 'a'; Console.Write(x); } Tip: Use single quotation marks to assign value. I hope it helps.
6th Aug 2016, 5:44 PM
Ricardo Pucca
Ricardo Pucca - avatar
+ 1
you can use it as a type of variable like (char bar = 'a') or an array of char (char[] foo ;)
6th Aug 2016, 5:46 PM
Rey Silva
Rey Silva - avatar
+ 1
or say you have a (string name = "johny") and you want the letter (h) you could do (char x = name[2];)
6th Aug 2016, 5:50 PM
Rey Silva
Rey Silva - avatar
+ 1
thanks to all i very useful
7th Aug 2016, 2:17 PM
johny