Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Console.ReadLine snippet for csharp #534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pianoboy71
Copy link

Created option for ReadLine to compliment the well-used WriteLine

"Console.ReadLine": {
"prefix": "cr",
"body": [
"System.Console.ReadLine($0);"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use System here? I don't think it's necessary as in new versions of C# it's implicitly used by default. And if not it's one of the first things to do in any program. Might be worth to also drop the System for WriteLine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason that it says System.Console instead of Console is because I copy-pasted the WriteLine snippet and changed it to ReadLine. I will edit it on mine when I have the time. Thanks.

@pianoboy71
Copy link
Author

I just edited it to remove the System prefix before the WriteLine and ReadLine snippets. I thought it looked cleaner without the System in front of it, but initially wanted to stick to the same formatting as how it was originally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants