C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Convert a String to ASCII


Posted Date: 18 Jun 2008    Resource Type: Code Snippets    Category: String Manipulations

Posted By: Anjali Sharma       Member Level: Gold
Rating:     Points: 4



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);
}




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Get ascii equivalent of a string  .  Get ASCII equivalent from a String  .  Convert string to ascii  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Seperate Characters and Numbers in a String in C#
Previous Resource: Using rope - a STL container
Return to Discussion Resource Index
Post New Resource
Category: String Manipulations


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use