Answers for "get input value c#"

C#
2

c# get value from textbox

string objTextBox = x.Text;
//Sample:
TextBox objTextBox = (TextBox)sender;
string theText = objTextBox.Text;
Posted by: Guest on September-23-2021
5

how to take input in c#

using System;

namespace beginner
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("what is your Name:- ");
            string userName = Console.ReadLine();
            Console.WriteLine("Hello: " + userName);

        }
    }
}
Posted by: Guest on July-01-2021
1

how to make an input in c#

string myName;

Console.WriteLine("Please, enter your full name here: ");
myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.Key();

/* OR */

Console.WriteLine("Please, enter your full name: ");
string myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.ReadKey();
Posted by: Guest on November-18-2020

C# Answers by Framework

Browse Popular Code Answers by Language