Advertisement
KodingKid

An introduction to C#

Mar 21st, 2021
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2.  
  3. public class Class1
  4. {
  5.     string greeting1 = "Hello world!";
  6.     public Class1() => Console.WriteLine(Greeting1);
  7.     public string Greeting1 { get => greeting1; set => greeting1 = value; }
  8.     const int numeral1 = 12345;
  9.     public Class1() => Console.WriteLine(numeral1);
  10.     double numeral2 = 1.5;
  11.     bool bool1 = true;
  12.     string userName = Console.ReadLine();
  13.     char greeting2 = "hi";
  14. }
  15.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement