c# - How to read char from the console and write them? [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Sorry, I've just started programming in C#. I would like to know what's the easiest way to read a character or characters from the console and store the value into a variable to be written to the console at a later point.
Thank you!

That would be:
string input = Console.ReadLine();

Related

How do I run Console.Write() on every new line? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How would I go about running Console.Write() on every new line?
Note that I do not want to use Console.WriteLine() because I still want to take input from that line.
Use Console.Write("\nInput your text here:");
\n in strings starts prints to a new line.

Validation Expression - C# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am trying to create a validation expression for a table name in the format of:
Name_TableName_YYYYMMDD
right now I have something like this:
^[a-zA-Z0-9][^_]+[a-zA-Z0-9][^_]+\d{8}
Number at the end can read 8 digits.
You could try this (very basic) expression
[a-zA-Z]+_[a-zA-Z]+_[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])
Link to a test

How To Compare two strings on Percentage Basis [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to compare two strings on percentage basis
like i have this
Player and wmplayer
Manager and IDMan
Mail and WINMail
Explorer and iexplorer
Any Help Please
You can probably make use of a library such as ScoreSharp. It is designed to do fuzzy matching to find similarities between strings.

How do i send a set of keys to my program to implement using code only no keyboard C#? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
How do i implement a set of keys that have been sent to me by another program , for example (Alt & F4) or any other wanted sequence ? , Thanks in Advance :)
Thanks to every one Turned out ,C# makes available a static class to do this:
SendKeys.Send("ABC");
this will send to the top most form ABC and for more keys check this link
http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx

How to print in C# - but not through crystal-report? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
How to print in C# - but not through crystal-report?
Can I get some simple sample code?
Look into the System.Drawing.Printing.PrintDocument class.
There's also a good tutorial here:
http://www.dreamincode.net/forums/showtopic44330.htm
this may be wrong because i'm dumb founded by the last part but to print you type "Console.WriteLine("whatever ur gonna print");"

Categories