Skip to content

Update types.md #39214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/csharp/tour-of-csharp/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Instances of classes are created using the `new` operator, which allocates memor

The memory occupied by an object is automatically reclaimed when the object is no longer reachable. It's not necessary or possible to explicitly deallocate objects in C#.

:::code language="csharp" source="./snippets/shared/Types.cs" ID="CreatePoints":::

Applications or tests for algorithms might need to create multiple `Point` objects. The following class generates a sequence of random points. The number of points is set by the *primary constructor* parameter. The primary constructor parameter `numberOfPoints` is in scope for all members of the class:

:::code language="csharp" source="./snippets/shared/Types.cs" ID="PointFactoryClass":::
Expand Down