コード例 #1
0
ファイル: z3test23.cs プロジェクト: nbulp/CodeContracts
  public void M(ConstructorTestDerived obj) {
    Contract.Requires(obj != null);
    Contract.Assert(this != null);

    var last = obj;
    while (obj != null) {
      last = obj;
      obj = obj.next;
    }

    Contract.Assert(last != null);
    Contract.Assert(this != null);
  }
コード例 #2
0
    public void M(ConstructorTestDerived obj)
    {
        Contract.Requires(obj != null);
        Contract.Assert(this != null);

        var last = obj;

        while (obj != null)
        {
            last = obj;
            obj  = obj.next;
        }

        Contract.Assert(last != null);
        Contract.Assert(this != null);
    }