Part 2 – C# Tutorial – Reading and writing to a console.avi
Text version of the video
http://csharp-video-tutorials.blogspot.co.uk/2012/06/part-2-c-tutorial-reading-and-writing.html
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1
Slides
http://csharp-video-tutorials.blogspot.com/2013/08/part-2-reading-writing-to-console.html
All C# Text Articles
http://csharp-video-tutorials.blogspot.co.uk/p/free-c-video-tutorial-for-beginners.html
All C# Slides
http://csharp-video-tutorials.blogspot.com/p/c.html
All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists
In this video, we will discuss
1. Reading from the console
2. Writing to the console
3. Two ways to write to console
a) Concatenation
b) Place holder syntax — Most preferred
Code samples used in the demo
using System;
class Program
{
static void Main()
{
// Prompt the user for his name
Console.WriteLine(“Please enter your name”);
// Read the name from console
string UserName = Console.ReadLine();
// Concatenate name with hello word and print
Console.WriteLine(“Hello ” + UserName);
//Placeholder syntax to print name with hello word
//Console.WriteLine(“Hello {0}”, UserName);
}
}
Please note that C# is case sensitive language.
Comments are closed.