Welcome to mirror list, hosted at ThFree Co, Russian Federation.

debugger-test2.cs « debugger « tests « wasm « sdks - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7275bf4a2f10e825b99197fd671c52cdadea431a (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
45
46
47
48
49
50
51
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

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;
    }
}