44
1
using System;
2
using System.Threading;
3
4
public class Program
5
{
6
public static void Main()
7
{
8
9
TwoInstance T1 = new TwoInstance();
10
TwoInstance T2 = new TwoInstance();
11
TwoInstance T3 = new TwoInstance(); // this will throw an error :)
12
}
13
14
public class TwoInstance
15
{
16
private static int countInstances=1;
17
//*if you want to get the count outside then make it
18
//public or create a static int method which will return this property*
19
20
public TwoInstance()
21
{
22
Console.WriteLine("Instance" + countInstances + "Created");
23
24
// countInstances++; *this is the basic thing which came
Cached Result
[
{
"performanceLevels": [
{
"performanceLevel_1": {
"title": {
"data-type": "string",
"source": "column",
"source-column": "title-column",
"default": "N/A"
},
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
},
"threeLevels": {
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
}
}
}
},
{
"performanceLevel_2": {
"title": {
"data-type": "string",
"source": "column",
"source-column": "title-column",
"default": "N/A"
},
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
}
}
}
]
}
]
------------------------------
Name: performanceLevels
SubMappers:
Name: performanceLevel_1
SubMappers:
Name: title
DataType: string
Source: column
SourceColumn: title-column
Default: N/A
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1
Name: threeLevels
SubMappers:
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1
Name: performanceLevel_2
SubMappers:
Name: title
DataType: string
Source: column
SourceColumn: title-column
Default: N/A
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1
{
"performanceLevels": [
{
"performanceLevel_1": {
"title": {
"data-type": "string",
"source": "column",
"source-column": "title-column",
"default": "N/A"
},
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
},
"threeLevels": {
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
}
}
}
},
{
"performanceLevel_2": {
"title": {
"data-type": "string",
"source": "column",
"source-column": "title-column",
"default": "N/A"
},
"version": {
"data-type": "int",
"source": "column",
"source-column": "version-column",
"default": "1"
}
}
}
]
}
]
------------------------------
Name: performanceLevels
SubMappers:
Name: performanceLevel_1
SubMappers:
Name: title
DataType: string
Source: column
SourceColumn: title-column
Default: N/A
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1
Name: threeLevels
SubMappers:
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1
Name: performanceLevel_2
SubMappers:
Name: title
DataType: string
Source: column
SourceColumn: title-column
Default: N/A
Name: version
DataType: int
Source: column
SourceColumn: version-column
Default: 1