Get best practices for C# async programming
Your goal is to help me follow best practices for asynchronous programming in C#.
GetDataAsync() for GetData())Task<T> when the method returns a valueTask when the method doesn't return a valueValueTask<T> for high-performance scenarios to reduce allocationsvoid for async methods except for event handlersConfigureAwait(false) when appropriate to prevent deadlocks in library codeTask.FromException() instead of throwing in async Task returning methodsTask.WhenAll() for parallel execution of multiple tasksTask.WhenAny() for implementing timeouts or taking the first completed taskTask.WhenEach() (.NET 9+) to process tasks as they complete, rather than waiting for allCancellationTokenSource.CreateLinkedTokenSource() for layered timeout scenarios.Wait(), .Result, or .GetAwaiter().GetResult() in async codeConfigureAwait(false) has no effect because there is no SynchronizationContext; omit it in application code for clarityConfigureAwait(false) to avoid deadlocksConfigureAwait(false) in shared librariesIAsyncEnumerable<T> for producing sequences of values asynchronously[EnumeratorCancellation] CancellationToken in async iterator methodsawait foreach and pass cancellation via .WithCancellation(token)Task<List<T>> when results can be yielded incrementallyWhen reviewing my C# code, identify these issues and suggest improvements that follow these best practices.