Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

ask int text c#

String input = Console.ReadLine();
int selectedOption;
if(int.TryParse(input, out selectedOption))
{
      switch(selectedOption) 
      {
           case 1:
                 //your code here.
                 break;
           case 2:
                //another one.
                break;
           //. and so on, default..
      }

} 
else
{
     //print error indicating non-numeric input is unsupported or something more meaningful.
}
Comment

ask int text c#

int input = Convert.ToInt32(Console.ReadLine());
Comment

ask int text c#

static void Main(string[] args)
    {
        Console.WriteLine("Please enter a number from 1 to 10");
        int counter = Convert.ToInt32(Console.ReadLine());
        //Here is your variable
        Console.WriteLine("The numbers start from");
        do
        {
            counter++;
            Console.Write(counter + ", ");

        } while (counter < 100);

        Console.ReadKey();

    }
Comment

PREVIOUS NEXT
Code Example
Csharp :: print all string in textbox in array c# 
Csharp :: ${1##*[! ]} 
Csharp :: c# ienumerable unassigned 
Csharp :: delete content from file c# 
Csharp :: unity phone vibration 
Csharp :: asp zero create feature 
Csharp :: == vs equals c# 
Csharp :: c# regex double of some letters only 
Csharp :: c# get the return value of a func 
Csharp :: get child index unity 
Csharp :: duplicate global system runtime versioning targetframeworkattribute 
Csharp :: get c directory contains system windows c# 
Csharp :: wpf repository pattern query async with includes properties 
Csharp :: c# single comment 
Csharp :: object escape player unity 
Csharp :: same click method lots of buttons c# 
Csharp :: shell32.dll c# example 
Csharp :: sql to linq converter online tool free 
Csharp :: c sharp making our custom function 
Csharp :: c sharp switch forms 
Csharp :: xamarin c# switch on hotspot Programmatically 
Csharp :: c# linq unique by property 
Csharp :: delay seconds in unity 
Csharp :: c# object list contains object returns incorrect boolean 
Csharp :: unity check if transform doent have parent 
Csharp :: trigger enter with nav mesh 
Csharp :: c# generic type converter 
Csharp :: c# sha512 salt 
Csharp :: regex ip rage detect 
Csharp :: how to change samesite=lax to samesite=none in asp.net 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =