Skip to content

Dispose IDisposable objects #1491

@nxtn

Description

@nxtn

We should call Dispose on objects that implement IDisposable in examples.

For example

HttpClient client = new HttpClient();
return client.GetStringAsync("https://docs.microsoft.com");

can be changed to

using (HttpClient client = new HttpClient())
{
    return client.GetStringAsync("https://docs.microsoft.com");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions