Simple Char

B3y steven 6/18/2008 9:50:00 PM

Ok so I evidently am not the sharpest knife in the drawer. I was trying to figure out how in the heck you set create and set a char variable.

Example:

[code:c#]char c = new char("s".ToCharArray[0]);[/code]

Yea I know now its as simple as using the single tick to specify the char literal;

[code:c#]char c = new char('s');[/code]

Good grief. Ah well, live and learn.

Currently rated 2.5 by 4 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered By BlogEngine Enhanced with Snapshots

About the author

Steven Hildreth Steven Hildreth
Proof that anyone can setup a blog.

E-mail me LinkedIn Profile

Send mail Sign in

Recent posts