Convert a String to ASCII
The sample code is a simple function written in C# that converts a given string to it's ASCII value.
Although the function returns a string, the string is actually the ASCII equivalent of the input.
string StringToASCII(string input)
{
int asc = 0;
int i = 0;
char c;
for (i = 0; i < input.Length; i++)
{
c = input[i];
asc = asc + input[i];
}
return Convert.ToString(asc);
}