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

gtest-212.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 099cc330fd211362635e9a9f42cfc8efcd2b33de (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
public interface SomeInterface
{
  bool Valid { get; }
}

public struct SomeStruct : SomeInterface
{
  public bool Valid {
    get {     
      return false;
    }
  }
}

public class Test
{
  public static void Fun<T>(T t) where T:SomeInterface {
    bool a = t.Valid;
  }

  public static void Main()
  {
    Fun(new SomeStruct());
  }
}