-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (25 loc) · 1.02 KB
/
Program.cs
File metadata and controls
31 lines (25 loc) · 1.02 KB
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
using System;
namespace Singleton
{
class Program
{
static void Main(string[] args)
{
int input = 0;
string output = string.Empty;
AppEngine appEngine = null;
Random random = new Random();
appEngine = AppEngine.Default;
Console.WriteLine(string.Format("Using appEngine ID={0} via property 'Default'!", appEngine.ID));
input = random.Next(int.MinValue, int.MaxValue);
output = appEngine.GetBinary(input);
Console.WriteLine(string.Format("The binary form of {0} is {1}", input, output));
appEngine = AppEngine.GetDefault();
Console.WriteLine(string.Format("Using appEngine ID={0} via method 'GetDefault()'!", appEngine.ID));
input = random.Next(int.MinValue, int.MaxValue);
output = appEngine.GetBinary(input);
Console.WriteLine(string.Format("The binary form of {0} is {1}", input, output));
Console.ReadKey();
}
}
}