C# salah satu bahasa pemograman yang menganut OOP. C# dikembangkan oleh salah satu perusahaan terkemuka yaitu Microsoft.
editor bahasa pemograman C# yang terkenal adalah microsoft visual studio.
contoh:
public class Hello
{
public static void Main (string[ ] args)
{
System.Console.WriteLine (“Hello, World! \n”);
}
}
kelebihan menggunakan bahasa bahasa pemrograman ini antara lain:
1. memenuhi syarat-syarat sebagai bahasa pemrograman yang bersifat Object.
2. bisa digunakan untuk membuat berbagai macam aplikasi.
3. tidak memiliki terlalu banyak keyword, sehingga dapat mengurangi kerumitan.
Public static void Main(string[] args)
merupakan fungsi yang harus ada agar amplikasi bisa diraning.
System.Console.WriteLine
berfungsi untuk mencetak informasi keconsole.
The escape character
code untu menampilkan special character seperti, baris baru ( newline ),
backspace character. List escape character yg digunakan di C#.
\’ Single Quotation Mark
\>> Double Quotation Mark
\\ backlash
\0 Null
\a Alert
\b Backspace
mungkin hanya itu saja yang saya tahu untuk tugas pertama ini
trimakasih
KUIS
1. Which of the following i not a classes ?
A. A ford Ikon car with the registration number XXXX
B. Fruit
C. Mammal
D. Fish
Answer : A
2. Which method diplays the message “Hello People” on the sceen ?
A. Console.WriteLine(“Hello People”);
B. System.WriteLine(“Hello People”);
C. Console(“Hello People”);
D. Console.writeline(“Hello People”);
Answer : A
3. Console is a...
A. Namespace
B. Class
C. Function
D. Escape Sequence character
Answer : B
4. In a C# program, which is the first function to be executed ?
A. Main()
B. main()
C. Console.WriteLine()
D. Void Accept_bike_details()
Answer : A
5. Which of the following is used to denote a newline character ?
A. \b
B. \n
C. /n
D. \v
Answer : B