

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use WriteLine() method of Console class in C#?
WriteLine() is a method of the Console class defined in the System namespace
This statement causes the message "Welcome!" to be displayed on the screen as shown below −
Example
using System; namespace Demo { class Test { static void Main(string[] args) { Console.WriteLine("Welcome!"); Console.ReadKey(); } } }
Output
Welcome!
To display a char array using the Console.WriteLine.
Example
using System; namespace Demo { class Test { static void Main(string[] args) { char[] arr = new char[] { 'W', 'e'}; Console.WriteLine(arr); Console.ReadKey(); } } }
Output
We
- Related Questions & Answers
- How to use ReadKey() method of Console class in C#?
- How to use headSet() method of Java NavigableSet Class
- How to use subSet() method of Java NavigableSet Class
- Console Class in C#
- How to use isAlive() method of Thread class in Java?
- How to use the Clear method of array class in C#?
- How to use the Clone() method of array class in C#?
- How to use the Copy(, ,) method of array class in C#
- How to use the CopyTo(,) method of array class in C#
- How to use the GetLength method of array class in C#?
- How to use the GetLongLength method of array class in C#?
- How to use the GetLowerBound method of array class in C#
- How to use the GetType method of array class in C#?
- How to use the GetUpperBound method of array class in C#?
- How to use the GetValue() method of array class in C#?
Advertisements