Skip to content

Use a better example for *expression statement* #46309

Closed
@BillWagner

Description

@BillWagner

Type of issue

Other (describe below)

Description

From anonymous feedback (edited):

The Console.WriteLine() example is valid as an invocation_expression, but a better example would be something like x++; where an expression is evaluated and produces a value (the result is x + 1), but the result is discarded.

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/statements

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/programming-guide/statements-expressions-operators/statements.md

Document Version Independent Id

b9a529ef-7ba1-6abf-55cf-c6e54935ae66

Platform Id

49186fa3-dedd-816f-f8dd-d1ab6547eddc

Article author

@BillWagner

Metadata

  • ID: 0ff0d7fd-3319-2d27-d89a-e92f6ce1285a
  • PlatformId: 49186fa3-dedd-816f-f8dd-d1ab6547eddc
  • Service: dotnet-csharp
  • Sub-service: fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions