-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
76 lines (56 loc) · 1.82 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Csharp
{
internal class Program
{
static void Main()
{
// Hello World
/*Console.WriteLine("Birendra Dhami");
Console.ReadLine();*/
//User input
/*Console.WriteLine("Enter Your name:");
string name = Console.ReadLine();
Console.WriteLine(name);*/
//jarray 2D
/*string[][,] name = new string[2][,] {
new string[,] {{ "Ram" , "Hari"} , { "Me", "You" } },
new string[,] {{ "Sita" , "Gita"} , {"Me" , "You"} }
};
for(int i=0; i< name.Length; i++)
{
for(int j=0; j< name[i].GetLength(0); j++)
{
for(int k=i; k< name[i].GetLength(1); k++)
{
Console.WriteLine(name[i][j,k]);
}
}
}*/
//Creating object
/* Console.WriteLine("Enter Name of the Shop:");
Shop s1 = new Shop();
s1.name = Console.ReadLine();
Console.WriteLine(s1.name);*/
//Accessing fields and methods
/* Console.WriteLine("Enter Name of the Shop:");
Shop s1 = new Shop();
s1.getName();
s1.printName();*/
//Constructor
//Shop s1 = new Shop();
//Inheritance
/* Info i1 = new Info();
i1.printName();*/
Console.WriteLine("Enter Shop's name: ");
Shop s1 = new Shop();
s1.Name = Console.ReadLine();
Console.WriteLine(s1.Name);
Console.ReadLine();
}
}
}