![]() |
VOOZH | about |
Hello World program is the most basic program of any programming language. It prints "Hello world" on the screen. In this article, we will display "Hello World" without using WriteLine Method. So to do this task we use the following methods:
For writing Hello World we are taking each separate character in ASCII format and then we are displaying these characters together.
| String | H | e | l | l | o | W | o | r | l | d | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ASCII Code | 72 | 101 | 108 | 108 | 111 | 32 | 87 | 111 | 114 | 108 | 100 |
1. Inside if condition, Write OpenStandardOutput() to display the Hello World.
2. This method is followed by BeginWrite() method that takes integer Bytes.
BeginWrite(new byte[] { 072, 101, 108, 108, 111, 032, 087, 111,
114, 108, 100, 0 }, 0, 12, null, null)
3. Finally we are using AsyncWaitHandle.WaitOne() method followed by BeginWrite() method.
BeginWrite(new byte[] { 072, 101, 108, 108, 111, 032, 087, 111,
114, 108, 100, 0 }, 0, 12, null,
null).AsyncWaitHandle.WaitOne())
Example:
Output:
Hello World