Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarsouza authored Aug 20, 2017
1 parent 0a5486a commit c2274d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,23 @@
Please send pull requests against the development branch instead of master. The
master branch is reserved to contain only the latest official public release of
the framework.


## Use C# 4.0

If possible, when contributing code to the framework, please avoid using C# language features from above C# 4.0. There are at least two reasons for this restriction:

1. **Mono:** To keep compatibility with the most widespread versions of Mono (4.x). If you take a look at our Travis-CI builds, you might see that the builds are actually done and run using Mono, so using any language feature that is not supported there will cause a failing build;
1. **Unity:** Some language features might not be accessible when targeting .NET 3.5, which for a long time has been the only .NET Framework version that could be run from inside [Unity](https://unity3d.com).

More specifically, when submitting pull-requests, please avoid using:

* The nameof(.) operator;
* Expression-bodied members;
* Null-conditional operators
* string interpolation
* async/await *
* value tuples

_\* Unless you can guard those sections using conditional compilation clauses (i.e. ```#if NET35```) and either exclude those code sections from the .NET 3.5 / Mono 4.0 builds or provide specific (possibly non-optimal) implementations for those platforms. Please take a look at the Accord.Compat namespace for help in filling missing functionality from higher platform versions if you run into any of those cases._

0 comments on commit c2274d1

Please sign in to comment.