// Sample Solution
using System;
namespace Review
{
class Program
{
static void Main(string[] args)
{
/* use this space to write your own short program!
Here's what you learned:
DATA TYPES: int, double, char, string, bool
VARIABLES: datatype variableName = value;
COMMON ERRORS: wrong type, wrong value, no semicolon
DATA TYPE CONVERSION: implicit, explicit, methods
Good luck! */
bool someValue = true;
string newValue = someValue.ToString();
Console.WriteLine(newValue);
char[] stringToCharArray = newValue.ToCharArray();
foreach(char ch in stringToCharArray){
Console.WriteLine(ch);
}
int charIntValue = Convert.ToInt16(stringToCharArray[0]);
Console.WriteLine(charIntValue);
}
}
}
No comments:
Post a Comment