Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Created February 11, 2015 10:17
Show Gist options
  • Save ufcpp/61ce43823a449564161d to your computer and use it in GitHub Desktop.
Save ufcpp/61ce43823a449564161d to your computer and use it in GitHub Desktop.
Method Contracts proposed in C# 7
public int Insert(T item, int index)
requires index >= 0 && index <= Count
ensures return >= 0 && return < Count
{
return InsertCore(item, index);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment