On this page

DirectSharp Language Specification — v1.0

This specification defines DirectSharp v1.0: syntax, binding, evaluation, observable behavior and required diagnostics. Reference C# illustrates implementation strategies; the language rules remain authoritative.

The language guide teaches the language; the reference helps you locate a particular construct and its C# implementation account.

Contents

Choose a chapter below or use the alphabetical lookup. Each rule has a stable CS identifier and a direct link on its chapter page. Older links to sections of this page are retained below and lead to the corresponding chapter.

1. Scope and conformance

2. Lexical structure

3. Names, namespaces and imports

4. Types

5. Declarations and scope

6. Expressions and operators

7. Statements and control flow

8. Actions and callables

9. Classes, data and members

10. Inheritance and interfaces

11. Enums, flags and one-of types

12. Contracts

13. Exceptions

14. Receiver and resource scopes

15. Collections, enumeration and consumption

16. Predicates and pattern matching

17. Async, iteration and concurrency

18. Lazy values

19. Events

20. Dependency injection and services

21. Attributes and documentation metadata

22. Extensions

23. Features

24. Wrappers

25. Preprocessing and includes

26. Project model

27. .NET interoperability

28. Reference C# lowering

Appendices