I’m surprised nobody has mentioned the static method built right into System.Char
…
int val = (int)Char.GetNumericValue('8');
// val == 8
More Related Contents:
- Implementing INotifyPropertyChanged – does a better way exist?
- What is App.config in C#.NET? How to use it?
- Launching an application (.EXE) from C#?
- How to bind an enum to a combobox control in WPF?
- How can I sign a file using RSA and SHA256 with .NET?
- How can I test for the presence of an Action Filter with constructor arguments?
- How to read an excel file in C# without using Microsoft.Office.Interop.Excel libraries
- How to prevent a SQL Injection escaping strings
- C# – Making a Process.Start wait until the process has start-up
- Hosting CLR in Delphi with/without JCL – example
- FtpWebRequest FTP download with ProgressBar
- C# – how to determine whether a Type is a number
- HttpContext.Current.Session is null in Ashx file
- How can I join int[] to a character-separated string in .NET?
- Where is HttpContent.ReadAsAsync?
- How do I clear System.Net client DNS cache?
- Patterns for Compensating Lack of Inheritance in SOA
- How does TransactionScope roll back transactions?
- RegEx – reusing subexpressions
- Should I always disconnect event handlers in the Dispose method?
- TargetedPatchingOptOut: “Performance critical to inline across NGen image boundaries”?
- using statement FileStream and / or StreamReader – Visual Studio 2012 Warnings
- Dynamically creating a proxy class
- Domain credentials for a WebClient class don’t work
- Connection to Office 365 by EWS API
- Method overload resolution unexpected behavior
- Entity Framework: Duplicate Records in Many-to-Many relationship
- How to create vertical navigation bar in Windows Forms?
- Calling an async method from a synchronous method
- How to send keys instead of characters to a process?