Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# char to int

int val = (int)Char.GetNumericValue('8');
Comment

c# char to int

char foo = '2';
int bar = foo - '0';
Comment

c# char to int

using System;
public class Test
{
	public static void Main()
	{
		char a = 'c';
		int answer = (int)a;//char to int convertion
		Console.WriteLine(answer);
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: asp.net core .gitignore 
Csharp :: c# winforms select folder dialogue 
Csharp :: Animator.GotoState: State could not be found UnityEngine.Animator:Play (string) 
Csharp :: how to get the startup path in console app 
Csharp :: enum loop 
Csharp :: set player position unity 
Csharp :: c# get directory of executable 
Csharp :: get program path c# 
Csharp :: unity print to console 
Csharp :: add two numbers in c# 
Csharp :: string to int c# 
Csharp :: Csharp convert string to double 
Csharp :: bold caption latex 
Csharp :: how to convert angle to vector in c# 
Csharp :: remove all non number in c# 
Csharp :: c# print out whole object 
Csharp :: c# run c# code from string 
Csharp :: c# monogame mouse position 
Csharp :: c# press key 
Csharp :: c# format string with 2 decimals 
Csharp :: double to int c# 
Csharp :: C# reflection invoke static generic method 
Csharp :: c# copy list without reference 
Csharp :: unity change tag of go 
Csharp :: unity button addlistener 
Csharp :: c# unity destroy first child object 
Csharp :: c# shuffle string array 
Csharp :: oncollisionenter 
Csharp :: set decimal point c# 
Csharp :: string from byte array c# 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =