Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

read in multiple numbers c#

//Read line, and split it by whitespace into an array of strings
string[] tokens = Console.ReadLine().Split();

//Parse element 0
int a = int.Parse(tokens[0]);

//Parse element 1
int b = int.Parse(tokens[1]);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to get the current gameobject animator in unity 
Csharp :: c# check if a directory exists 
Csharp :: c# check to see if dictionary key exists 
Csharp :: iso date format c# 
Csharp :: c# write all bytes to a file 
Csharp :: degree to radians c# 
Csharp :: c# format string to date yyyymmdd 
Csharp :: c# unix timestamp 
Csharp :: c# get free space on drive 
Csharp :: left moust click unity 
Csharp :: raycast shoot unity 
Csharp :: dotnet executable directory 
Csharp :: unity movetowards 
Csharp :: unity get speed of object 
Csharp :: unity add component 
Csharp :: resize image c# 
Csharp :: how to create directory folder in c# 
Csharp :: get path c# 
Csharp :: create asset menu unity 
Csharp :: unity destroy object when out of screen 
Csharp :: c# get last two characters of string 
Csharp :: substring c# after character 
Csharp :: c# how to convert string to int 
Csharp :: c# add to start of list 
Csharp :: change scene unity 
Csharp :: how to insert qoutation marks into string c# 
Csharp :: c# find index element array 
Csharp :: C# multiple button click event to password textbox 
Csharp :: c# null check can be simplified 
Csharp :: how to make a partical system to destroy itself after it finishing 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =