blob: 907cc52e3364495cfe84727c0e719959cf32cbac (
plain)
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
|
using System;
public class Misc { //Only append content to this class as the test suite depends on line info
public static int CreateObject (int foo, int bar) {
var f = new Fancy () {
Foo = foo,
Bar = bar,
};
Console.WriteLine ($"{f.Foo} {f.Bar}");
return f.Foo + f.Bar;
}
}
public class Fancy {
public int Foo;
public int Bar { get ; set; }
public static void Types () {
double dPI = System.Math.PI;
float fPI = (float)System.Math.PI;
int iMax = int.MaxValue;
int iMin = int.MinValue;
uint uiMax = uint.MaxValue;
uint uiMin = uint.MinValue;
long l = uiMax * (long)2;
long lMax = long.MaxValue; // cannot be represented as double
long lMin = long.MinValue; // cannot be represented as double
sbyte sbMax = sbyte.MaxValue;
sbyte sbMin = sbyte.MinValue;
byte bMax = byte.MaxValue;
byte bMin = byte.MinValue;
short sMax = short.MaxValue;
short sMin = short.MinValue;
ushort usMin = ushort.MinValue;
ushort usMax = ushort.MaxValue;
var d = usMin + usMax;
}
}
|