+ 1
hello, how tou use char in c# please get some example to me
thanks to answer me
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.
+ 1
you can use it as a type of variable like (char bar = 'a')
or an array of char (char[] foo ;)
+ 1
or say you have a (string name = "johny") and you want the letter (h) you could do (char x = name[2];)
+ 1
thanks to all i very useful