Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

ASCII codes in XAML

$
0
0

How can I get ASCII codes of a string I'm taking as an input from user(via textBox1)?

string abc= textBox1.Text;
block1.Text=abc ;

foreach (byte b in System.Text.Encoding.UTF8.GetBytes(block1.Text.ToCharArray()));
{
block1.Text=b.ToString();

}

I tried this code but I keep on getting the error msg:

The name 'b' does not exist in the current context

I am using Visual Studio 2012 Ultimate to create a XAML(Windows Store) project.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>